4 #define INT_SEND_STAT(a,b) SEND_STAT(a,b,_STAT_VER)
5 #define INT_SEND_GET_XATTR(a,b) SEND_GET_XATTR(a,b,_STAT_VER)
6 #define INT_SEND_GET_STAT(a,b) SEND_GET_STAT(a,b)
8 +/* 10.10 uses id_t in getpriority/setpriority calls, so pretend
9 + id_t is used everywhere, just happens to be int on some OSes */
16 +#include <sys/types.h>
24 -#include <sys/types.h>
27 #endif /* HAVE_SYS_ACL_H */
28 @@ -1911,7 +1918,7 @@ ssize_t fremovexattr(int fd, const char
30 #endif /* HAVE_FREMOVEXATTR */
32 -int setpriority(int which, int who, int prio){
33 +int setpriority(int which, id_t who, int prio){
34 if (fakeroot_disabled)
35 return next_setpriority(which, who, prio);
36 next_setpriority(which, who, prio);
37 @@ -2520,3 +2527,19 @@ int sysinfo(int command, char *buf, long
43 +int openat(int dir_fd, const char *pathname, int flags, ...)
47 + if (flags & O_CREAT) {
49 + va_start(args, flags);
50 + mode = va_arg(args, int);
54 + return next_openat(dir_fd, pathname, flags, mode);
59 @@ -146,7 +146,7 @@ setfsgid;gid_t;(gid_t fsgid);(fsgid)
60 initgroups;int;(const char *user, INITGROUPS_SECOND_ARG group);(user, group)
61 getgroups;int;(int size, gid_t list[]);(size, list)
62 setgroups;int;(SETGROUPS_SIZE_TYPE size, const gid_t *list);(size, list)
63 -setpriority;int;(int which, int who, int prio);(which, who, prio)
64 +setpriority;int;(int which, id_t who, int prio);(which, who, prio)
66 capset;int;(cap_user_header_t hdrp, const cap_user_data_t datap);(hdrp, datap)
67 #endif /* HAVE_CAPSET */
68 @@ -198,7 +198,7 @@ fchownat;int;(int dir_fd, const char *pa
69 mkdirat;int;(int dir_fd, const char *pathname, mode_t mode);(dir_fd, pathname, mode)
70 #endif /* HAVE_MKDIRAT */
72 -openat;int;(int dir_fd, const char *pathname, int flags);(dir_fd, pathname, flags)
73 +openat;int;(int dir_fd, const char *pathname, int flags, mode_t mode);(dir_fd, pathname, flags, mode);;(int dir_fd, const char *pathname, int flags, ...)
74 #endif /* HAVE_OPENAT */
76 renameat;int;(int olddir_fd, const char *oldpath, int newdir_fd, const char *newpath);(olddir_fd, oldpath, newdir_fd, newpath)
79 @@ -46,26 +46,30 @@ BEGIN{
85 + argtype_def = argtype
88 print "extern " ret " MY_DEF(" name ")" argtype " __attribute__((visibility(\"hidden\")));" > headerfile;
89 print "INTERPOSE(MY_DEF(" name "_RAW)," name "_RAW);" > structfile;
90 print "#undef " name > deffile
91 print "#define " name " MY_DEF(" name "_RAW)" > deffile
93 - print "extern " ret, name, argtype ";" > tmpffile;
94 + print "extern " ret, name, argtype_def ";" > tmpffile;
95 print "static __inline__ " ret " NEXT_" MACRO "_NOARG " argtype " __attribute__((always_inline));" > tmpffile;
96 print "static __inline__ " ret " NEXT_" MACRO "_NOARG " argtype " {" > tmpffile;
97 print " return " name, argname ";" > tmpffile;
101 - print "extern " ret " my_" name, argtype " __attribute__((visibility(\"hidden\")));" > headerfile;
102 + print "extern " ret " my_" name, argtype_def " __attribute__((visibility(\"hidden\")));" > headerfile;
103 print "#undef " name > structfile;
104 print "INTERPOSE(my_" name "," name ");" > structfile;
105 print "#define " name " my_" name > structfile
106 print "#define " name " my_" name > deffile
108 - print "extern " ret, name, argtype ";" > tmpffile;
109 + print "extern " ret, name, argtype_def ";" > tmpffile;
111 print "static __inline__ " ret " next_" name, argtype " __attribute__((always_inline));" > tmpffile;
112 print "static __inline__ " ret " next_" name, argtype " {" > tmpffile;
115 @@ -146,6 +146,7 @@ for first in size_t int; do
116 #include <sys/types.h>