about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorFrédéric Bérat <fberat@redhat.com>2023-04-26 11:45:11 +0200
committerFrédéric Bérat <fberat@redhat.com>2023-07-05 16:59:48 +0200
commit391f5e9619ef540eea00fb622f4381dae9d8cb44 (patch)
treeb523bd13f26321fb3bf596829c9b24d2cd4a858d /include
parent64f9857507f6dbf9715350b75e83b465be9b8f03 (diff)
downloadglibc-391f5e9619ef540eea00fb622f4381dae9d8cb44.tar.gz
glibc-391f5e9619ef540eea00fb622f4381dae9d8cb44.tar.xz
glibc-391f5e9619ef540eea00fb622f4381dae9d8cb44.zip
posix/bits/unistd.h: Clearly separate declaration from definitions
This change is similar to what was done for bits/wchar2.h.
Routines declaration are moved into a dedicated bits/unistd-decl.h file
which is then included into the bits/unistd.h file.

This will allow to adapt the files so that PLT entries are not created when
_FORTIFY_SOURCE is enabled.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'include')
-rw-r--r--include/bits/unistd-decl.h1
-rw-r--r--include/unistd.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/bits/unistd-decl.h b/include/bits/unistd-decl.h
new file mode 100644
index 0000000000..7fcbd272ac
--- /dev/null
+++ b/include/bits/unistd-decl.h
@@ -0,0 +1 @@
+#include <posix/bits/unistd-decl.h>
diff --git a/include/unistd.h b/include/unistd.h
index 4345d08d60..b042a485f9 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -5,6 +5,7 @@
 
 #  include <stdbool.h>
 #  include <kernel-features.h>
+#  include <bits/unistd-decl.h>
 
 libc_hidden_proto (_exit, __noreturn__)
 #  ifndef NO_RTLD_HIDDEN