Subject: kern/5162: Standard syscalls no longer found in sys/syscall.h
To: None <gnats-bugs@gnats.netbsd.org>
From: Brett Slager <bds@snarf.thnet.com>
List: netbsd-bugs
Date: 03/15/1998 19:19:16
>Number:         5162
>Category:       kern
>Synopsis:       Standard syscalls no longer found in sys/syscall.h
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 15 16:20:01 1998
>Last-Modified:
>Originator:     Brett Slager
>Organization:
>Release:        NetBSD-current March 14, 1998
>Environment:
System: NetBSD snarf.thnet.com 1.3E NetBSD 1.3E (SNARF) #0: Sat Mar 14 18:54:13 EST 1998 bds@snarf.thnet.com:/home/tortise/netbsd/src/sys/arch/i386/compile/SNARF i386


>Description:
	System calls whose interfaces have changed have been given new
	names to support libc "versioning."  Unfortunately, the old
	standard names are no longer exported via sys/syscall.h.
	This breaks some libraries and programs which rely on the syscall(2)
	interface to complete intercepted system calls.
	An example can be found in the mit-pthreads package (to which a
	hack around SYS_fstat had recently been applied.)  Mit-pthreads
	attempts to find various syscalls by searching through sys/syscall.h
	and fails to find SYS_fstat, a needed syscall.
>How-To-Repeat:
	Examine the code, or configure an unpatched mit-pthreads and notice
	the missed syscall.
>Fix:
	Make makesyscalls.sh generate aliases for the old names of
	renamed calls for sys/syscall.h.  Example:

	/* syscall: "__fstat13" ret: "int" args: "int" "struct stat *" */
	#define SYS___fstat13   279
	#define SYS_fstat	SYS___fstat13
>Audit-Trail:
>Unformatted: