blob: c612dd8d5dc439125ee4bcfecbc26ca56b8d774f [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001From 14ef83291096e019ebc48040cf63530a2574a26d Mon Sep 17 00:00:00 2001
2From: Alex Kiernan <alex.kiernan@gmail.com>
3Date: Sun, 19 Jan 2020 16:03:21 +0000
4Subject: [PATCH] Use unistd.h not argp.h for all POSIX systems
5
6getopt(3) is found in unistd.h on all POSIX systems and we make no use
7of any of the GNU specific argp extensions. Include unistd.h directly to
8allow building with musl on linux, whilst retaining compatibility with
9glibc and other unices.
10
Patrick Williamsb9af8752023-01-30 13:28:01 -060011Upstream-Status: Submitted [https://github.com/Gregwar/fatcat/pull/34]
Andrew Geissler82c905d2020-04-13 13:39:40 -050012Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Andrew Geissler82c905d2020-04-13 13:39:40 -050013---
14 src/fatcat.cpp | 8 ++------
15 1 file changed, 2 insertions(+), 6 deletions(-)
16
17diff --git a/src/fatcat.cpp b/src/fatcat.cpp
18index 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>