diff options
author | Tor Lillqvist <tml@collabora.com> | 2020-06-23 01:19:23 +0300 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-11-10 15:24:26 +0100 |
commit | a09a89b799b37b4ef24a0b18195d1654ebf683d7 (patch) | |
tree | 44d6e25a7b2543a5510526655dc4e7c738950e34 /external | |
parent | 7002053174aed5c3a7b1fe5b1785011080aa6cbe (diff) |
Add getopt declarations
Avoids: implicit declaration of function 'getopt' is invalid in C99
[-Werror,-Wimplicit-function-declaration] on macOS with current Xcode.
Change-Id: Ic178f53d1002425df52e220b1723fb12edca13df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96910
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105498
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'external')
-rw-r--r-- | external/nss/UnpackedTarball_nss.mk | 1 | ||||
-rw-r--r-- | external/nss/nss.getopt.patch.0 | 25 |
2 files changed, 26 insertions, 0 deletions
diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk index f49d55fab46e..d23d3217fb1c 100644 --- a/external/nss/UnpackedTarball_nss.mk +++ b/external/nss/UnpackedTarball_nss.mk @@ -25,6 +25,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\ external/nss/nss-bz1646594.patch.1 \ external/nss/macos-dlopen.patch.0 \ external/nss/nss-restore-manual-pre-dependencies.patch.1 \ + external/nss/nss.getopt.patch.0 \ $(if $(filter iOS,$(OS)), \ external/nss/nss-ios.patch) \ $(if $(filter ANDROID,$(OS)), \ diff --git a/external/nss/nss.getopt.patch.0 b/external/nss/nss.getopt.patch.0 new file mode 100644 index 000000000000..aeabb33f9b97 --- /dev/null +++ b/external/nss/nss.getopt.patch.0 @@ -0,0 +1,25 @@ +# pr/tests/sel_spd.c:427:20: error: implicit declaration of function 'getopt' is invalid in C99 [-Werror,-Wimplicit-function-declaration] +--- nspr/pr/tests/sel_spd.c ++++ nspr/pr/tests/sel_spd.c +@@ -15,6 +15,9 @@ + #include <stdio.h> + #include <errno.h> + #include <string.h> ++ ++extern char *optarg; ++int getopt(int argc, char *const argv[], const char *optstring); + + #ifdef DEBUG + #define PORT_INC_DO +100 +--- nspr/pr/tests/testfile.c ++++ nspr/pr/tests/testfile.c +@@ -23,6 +23,9 @@ + #include <getopt.h> + #include <errno.h> + #endif /* XP_OS2 */ ++ ++extern char *optarg; ++int getopt(int argc, char *const argv[], const char *optstring); + + static int _debug_on = 0; + |