Closed sjorge closed 9 years ago
This was also reported by @davefinster here: https://www.mail-archive.com/smartos-discuss@lists.smartos.org.email.enqueue.archive.listbox.com/msg00849.html I've reached out via email to see if/how he fixed this.
here is a diff of a working syscall.h vs a new broken syscall.h, probably some lx branded zone calls that got added that broke stuff.
--- /usr/include/sys/syscall.h Thu Jul 9 20:37:39 2015
+++ syscall.h Wed Jul 22 19:12:45 2015
@@ -23,7 +23,6 @@
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
* Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved.
- * Copyright (c) 2015, Joyent, Inc. All rights reserved.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
@@ -294,9 +293,6 @@
#define SYS_fchdir 120
#define SYS_readv 121
#define SYS_writev 122
-#define SYS_preadv 123
-#define SYS_pwritev 124
-#define SYS_getrandom 126
#define SYS_mmapobj 127
#define SYS_setrlimit 128
#define SYS_getrlimit 129
@@ -511,8 +507,8 @@
#if !defined(_KERNEL)
-extern long syscall(int, ...);
-extern long __systemcall(sysret_t *, int, ...);
+extern int syscall(int, ...);
+extern int __systemcall(sysret_t *, int, ...);
extern int __set_errno(int);
#endif /* _KERNEL */
It looks like the check for the header in samba 4.2.3 is being done from lib/replace/wscript
line 75:
conf.CHECK_HEADERS('syscall.h sys/syscall.h inttypes.h')
Per IRC conversation in #smartos this header shouldn't be used directly.
Hi Guys
Rather hacky, but I just commented out
#include <sys/syscall.h>
on line 31 of uid_wrapper.c. Thats the only change I had to make and everything compiled normally and runs as expected.
Unfortunately I haven't had time to properly trace back why it's falling into both of the ifdefs.
This is 'fixed' in master by means of a .patch file that does the above. I had a successful build today with it. I have yet to install/test. Ideally this will get cleaned up in the samba project directly, but for now this works.
It got merged in 1c522bc61794adf22a19e2dd0d2dff984c705d51
Reported by @rsully.
Samba 4.2.x probably needs a patch. Will look into this when I have more time.
Workaround (ugly):
mount -F lofs /root/syscall.h /usr/include/sys/syscall.h