Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148023680
D49774.1785133644.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D49774.1785133644.diff
View Options
diff --git a/sys/sys/random.h b/sys/sys/random.h
--- a/sys/sys/random.h
+++ b/sys/sys/random.h
@@ -156,16 +156,18 @@
#define random_harvest_queue_ether(a, b) do {} while (0)
#endif /* defined(RANDOM_ENABLE_ETHER) */
+#else /* !_KERNEL */
+
+#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0
+#include <ssp/random.h>
+#endif
+
#endif /* _KERNEL */
#define GRND_NONBLOCK 0x1
#define GRND_RANDOM 0x2
#define GRND_INSECURE 0x4
-#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0
-#include <ssp/random.h>
-#endif
-
__BEGIN_DECLS
ssize_t getrandom(void *buf, size_t buflen, unsigned int flags);
__END_DECLS
diff --git a/sys/sys/select.h b/sys/sys/select.h
--- a/sys/sys/select.h
+++ b/sys/sys/select.h
@@ -49,7 +49,7 @@
typedef __sigset_t sigset_t;
#endif
-#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0
+#if !defined(_KERNEL) && defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0
#include <ssp/ssp.h>
#else
#define __SSP_FORTIFY_LEVEL 0
diff --git a/sys/sys/socket.h b/sys/sys/socket.h
--- a/sys/sys/socket.h
+++ b/sys/sys/socket.h
@@ -685,12 +685,12 @@
#endif /* __BSD_VISIBLE */
+#ifndef _KERNEL
+
#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0
#include <ssp/socket.h>
#endif
-#ifndef _KERNEL
-
#include <sys/cdefs.h>
__BEGIN_DECLS
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jul 27, 6:27 AM (1 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29276308
Default Alt Text
D49774.1785133644.diff (1 KB)
Attached To
Mode
D49774: sys: protect the kernel build from accidental _FORTIFY_SOURCE
Attached
Detach File
Event Timeline
Log In to Comment