summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2016-04-24 19:48:29 +0000
committerdholland <dholland@NetBSD.org>2016-04-24 19:48:29 +0000
commit45d8ffbcbe3edcce801e475f30ca7a3725884b17 (patch)
tree1e1e62185d79b690f2b73b1ff5919d1ca274d973 /include
parent12a6844d871b19c084c5ed7c1d5fb66d0ae0bfd5 (diff)
Define SEM_VALUE_MAX in only one place.
Adding a whole extra header file just for this is not the optimal solution... but stuffing it in with anything else exposes things that otherwise wouldn't be. Nothing in userland should use <sys/semaphore.h> directly, and if some foolish third-party software should decide to do so anyway in spite of the instructions to the contrary I will ruthlessly break it later when the big kernel includes cleanup finally happens. Reported by Kamil Rytarowski, and, as it turns out, also by Klaus Heinz in 2008.
Diffstat (limited to 'include')
-rw-r--r--include/semaphore.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/semaphore.h b/include/semaphore.h
index d9dee950bd3..0f86d33ad23 100644
--- a/include/semaphore.h
+++ b/include/semaphore.h
@@ -1,4 +1,4 @@
-/* $NetBSD: semaphore.h,v 1.4 2012/03/08 21:59:28 joerg Exp $ */
+/* $NetBSD: semaphore.h,v 1.5 2016/04/24 19:48:29 dholland Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -38,8 +38,8 @@ struct _sem_st;
typedef struct _sem_st *sem_t;
#define SEM_FAILED ((sem_t *)0)
-#define SEM_VALUE_MAX (~0U)
+#include <sys/semaphore.h> /* some kernel-only bits */
#include <sys/time.h>
__BEGIN_DECLS