aboutsummaryrefslogtreecommitdiff
path: root/include/compat/unistd.h
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2023-07-07 11:46:21 +0300
committerBrent Cook <busterb@gmail.com>2023-07-07 12:11:20 +0300
commit7463f87cf1c3b8494a604976a8f818b07747b55e (patch)
treeb650ee1a218d8fdaf5d7794f4b0f2902ca080ce4 /include/compat/unistd.h
parente06ce19f9531240fa4e754197850184dbcd445fc (diff)
downloadportable-7463f87cf1c3b8494a604976a8f818b07747b55e.tar.gz
portable-7463f87cf1c3b8494a604976a8f818b07747b55e.tar.bz2
portable-7463f87cf1c3b8494a604976a8f818b07747b55e.zip
add compat getopt implementation, remove patches
This adds a getopt implementation for compatibility where it is not available, removing a couple of regress patches. Note, this is a slightly modified copy from OpenBSD libc that doesn't expose getopt_long, which has dependency conflicts with Windows system headers and isn't needed anyway.
Diffstat (limited to 'include/compat/unistd.h')
-rw-r--r--include/compat/unistd.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/compat/unistd.h b/include/compat/unistd.h
index 5e6ab1d..2583a6e 100644
--- a/include/compat/unistd.h
+++ b/include/compat/unistd.h
@@ -64,6 +64,10 @@ int getentropy(void *buf, size_t buflen);
64#endif 64#endif
65#endif 65#endif
66 66
67#ifndef HAVE_GETOPT
68#include <getopt.h>
69#endif
70
67#ifndef HAVE_GETPAGESIZE 71#ifndef HAVE_GETPAGESIZE
68int getpagesize(void); 72int getpagesize(void);
69#endif 73#endif