diff options
Diffstat (limited to 'build')
-rw-r--r-- | build/has/getmntent-1.c | 9 | ||||
-rw-r--r-- | build/has/getmntent-2.c | 10 | ||||
-rw-r--r-- | build/header.mk | 2 |
3 files changed, 21 insertions, 0 deletions
diff --git a/build/has/getmntent-1.c b/build/has/getmntent-1.c new file mode 100644 index 0000000..9854dcd --- /dev/null +++ b/build/has/getmntent-1.c @@ -0,0 +1,9 @@ +// Copyright © Tavian Barnes <tavianator@tavianator.com> +// SPDX-License-Identifier: 0BSD + +#include <mntent.h> +#include <stdio.h> + +int main(void) { + return !getmntent(stdin); +} diff --git a/build/has/getmntent-2.c b/build/has/getmntent-2.c new file mode 100644 index 0000000..71f0220 --- /dev/null +++ b/build/has/getmntent-2.c @@ -0,0 +1,10 @@ +// Copyright © Tavian Barnes <tavianator@tavianator.com> +// SPDX-License-Identifier: 0BSD + +#include <stdio.h> +#include <sys/mnttab.h> + +int main(void) { + struct mnttab mnt; + return getmntent(stdin, &mnt); +} diff --git a/build/header.mk b/build/header.mk index 52dcb6a..da6de68 100644 --- a/build/header.mk +++ b/build/header.mk @@ -24,6 +24,8 @@ HEADERS := \ gen/has/getdents.h \ gen/has/getdents64.h \ gen/has/getdents64-syscall.h \ + gen/has/getmntent-1.h \ + gen/has/getmntent-2.h \ gen/has/getmntinfo.h \ gen/has/getprogname.h \ gen/has/getprogname-gnu.h \ |