Module Name:    src
Committed By:   wiz
Date:           Mon Aug  1 14:19:40 UTC 2022

Modified Files:
        src/include: sched.h

Log Message:
sched.h: Linux documents clone and __clone as only available
when_GNU_SOURCE is defined - follow suit.

Ok martin@


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/include/sched.h

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

Modified files:

Index: src/include/sched.h
diff -u src/include/sched.h:1.12 src/include/sched.h:1.13
--- src/include/sched.h:1.12	Sun Jan 11 03:04:12 2009
+++ src/include/sched.h	Mon Aug  1 14:19:40 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: sched.h,v 1.12 2009/01/11 03:04:12 christos Exp $	*/
+/*	$NetBSD: sched.h,v 1.13 2022/08/01 14:19:40 wiz Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -59,20 +59,26 @@ __END_DECLS
 #define sched_yield		__libc_thr_yield
 #endif /* __LIBPTHREAD_SOURCE__ */
 
-#if defined(_NETBSD_SOURCE)
-
 __BEGIN_DECLS
 
+#if defined(_NETBSD_SOURCE)
+
 /* Process affinity functions (not portable) */
 int	sched_getaffinity_np(pid_t, size_t, cpuset_t *);
 int	sched_setaffinity_np(pid_t, size_t, cpuset_t *);
 
+#endif /* _NETBSD_SOURCE */
+
+#if defined(_GNU_SOURCE)
+
 /* Historical functions, not defined in standard */
+/* Linux man page documents these functions as only available when
+ * _GNU_SOURCE is defined */
 pid_t	 clone(int (*)(void *), void *, int, void *);
 pid_t	__clone(int (*)(void *), void *, int, void *);
 
-__END_DECLS
+#endif /* _GNU_SOURCE */
 
-#endif /* _NETBSD_SOURCE */
+__END_DECLS
 
 #endif /* _SCHED_H_ */

Reply via email to