Module Name:    src
Committed By:   thorpej
Date:           Sat May 16 16:16:59 UTC 2020

Modified Files:
        src/lib/libc/include: futex_private.h

Log Message:
Avoid pulling in "namespace.h" here, as it can have unintended
effects on consumers of this header.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/include/futex_private.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/include/futex_private.h
diff -u src/lib/libc/include/futex_private.h:1.1 src/lib/libc/include/futex_private.h:1.2
--- src/lib/libc/include/futex_private.h:1.1	Sun Apr 26 18:53:32 2020
+++ src/lib/libc/include/futex_private.h	Sat May 16 16:16:59 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: futex_private.h,v 1.1 2020/04/26 18:53:32 thorpej Exp $	*/
+/*	$NetBSD: futex_private.h,v 1.2 2020/05/16 16:16:59 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -32,33 +32,32 @@
 #ifndef __LIBC_FUTEX_PRIVATE
 #define __LIBC_FUTEX_PRIVATE
 
-#if defined(_LIBC)
-#include "namespace.h"
-#endif
-
 #include <sys/cdefs.h>
 #include <sys/syscall.h>
 #include <sys/futex.h>
 #include <unistd.h>
 
+/* XXX Avoid pulling in namespace.h. */
+extern int _syscall(int, ...);
+
 static inline int __unused
 __futex(volatile int *uaddr, int op, int val, const struct timespec *timeout,
 	volatile int *uaddr2, int val2, int val3)
 {
-	return syscall(SYS___futex, uaddr, op, val, timeout, uaddr2,
+	return _syscall(SYS___futex, uaddr, op, val, timeout, uaddr2,
 			val2, val3);
 }
 
 static inline int __unused
 __futex_set_robust_list(void *head, size_t len)
 {
-	return syscall(SYS___futex_set_robust_list, head, len);
+	return _syscall(SYS___futex_set_robust_list, head, len);
 }
 
 static inline int __unused
 __futex_get_robust_list(lwpid_t lwpid, void **headp, size_t *lenp)
 {
-	return syscall(SYS___futex_get_robust_list, lwpid, headp, lenp);
+	return _syscall(SYS___futex_get_robust_list, lwpid, headp, lenp);
 }
 
 #endif /* __LIBC_FUTEX_PRIVATE */

Reply via email to