170510 Don't warn about ioctl of size 0 without direction hint
241072 List tools in --help output
327548 false positive while destroying mutex
+382034 Testcases build fixes for musl
351857 confusing error message about valid command line option
392331 Spurious lock not held error from inside pthread_cond_timedwait
400793 pthread_rwlock_timedwrlock false positive
#include <stdio.h>
#include <errno.h>
#include <string.h>
+#include "../../../config.h"
+
/* Stuff from Wine. */
/* our copy of the ldt */
LDT_ENTRY ldt_copy[8192];
+#if defined(MUSL_LIBC)
+#define MODIFY_LDT(func, ptr, bytecount) syscall(SYS_modify_ldt, (func), (ptr), (bytecount) );
+#else
+#define MODIFY_LDT(func, ptr, bytecount) __modify_ldt((func), (ptr), (bytecount) );
/* System call to set LDT entry. */
//extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
extern int __modify_ldt (int, void *, size_t);
+#endif
void print_ldt ( void )
{
int res;
- res = __modify_ldt( 0, ldt_copy, 8192*sizeof(LDT_ENTRY) );
+ res = MODIFY_LDT( 0, ldt_copy, 8192*sizeof(LDT_ENTRY) );
printf("got %d bytes\n", res );
perror("error is");
}
ldt_entry.read_exec_only = 0;
ldt_entry.limit_in_pages = 0;
ldt_entry.seg_not_present = 0;
- stat = __modify_ldt (1, &ldt_entry, sizeof (ldt_entry));
+ stat = MODIFY_LDT (1, &ldt_entry, sizeof (ldt_entry));
printf("stat = %d\n", stat);
}