Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | From 14ef83291096e019ebc48040cf63530a2574a26d Mon Sep 17 00:00:00 2001 |
| 2 | From: Alex Kiernan <alex.kiernan@gmail.com> |
| 3 | Date: Sun, 19 Jan 2020 16:03:21 +0000 |
| 4 | Subject: [PATCH] Use unistd.h not argp.h for all POSIX systems |
| 5 | |
| 6 | getopt(3) is found in unistd.h on all POSIX systems and we make no use |
| 7 | of any of the GNU specific argp extensions. Include unistd.h directly to |
| 8 | allow building with musl on linux, whilst retaining compatibility with |
| 9 | glibc and other unices. |
| 10 | |
Patrick Williams | b9af875 | 2023-01-30 13:28:01 -0600 | [diff] [blame^] | 11 | Upstream-Status: Submitted [https://github.com/Gregwar/fatcat/pull/34] |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 12 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 13 | --- |
| 14 | src/fatcat.cpp | 8 ++------ |
| 15 | 1 file changed, 2 insertions(+), 6 deletions(-) |
| 16 | |
| 17 | diff --git a/src/fatcat.cpp b/src/fatcat.cpp |
| 18 | index ce23ca07bb99..b4427e465bde 100644 |
| 19 | --- a/src/fatcat.cpp |
| 20 | +++ b/src/fatcat.cpp |
| 21 | @@ -1,14 +1,10 @@ |
| 22 | #include <stdlib.h> |
| 23 | -#include<string.h> |
| 24 | -#ifdef __APPLE__ |
| 25 | -#include <unistd.h> |
| 26 | -#else |
| 27 | +#include <string.h> |
| 28 | #ifdef __WIN__ |
| 29 | #include <ctype.h> |
| 30 | #include "xgetopt/xgetopt.h" |
| 31 | #else |
| 32 | -#include <argp.h> |
| 33 | -#endif |
| 34 | +#include <unistd.h> |
| 35 | #endif |
| 36 | |
| 37 | #include <stdio.h> |