Add getopt declarations
Avoids: implicit declaration of function 'getopt' is invalid in C99 [-Werror,-Wimplicit-function-declaration]. Change-Id: Ic178f53d1002425df52e220b1723fb12edca13df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96910 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
This commit is contained in:
1
external/nss/UnpackedTarball_nss.mk
vendored
1
external/nss/UnpackedTarball_nss.mk
vendored
@@ -24,6 +24,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
|
||||
external/nss/nss.bzmozilla1238154.patch \
|
||||
external/nss/macos-dlopen.patch.0 \
|
||||
external/nss/nss.nspr-parallel-win-debug_build.patch \
|
||||
external/nss/nss.getopt.patch.0 \
|
||||
$(if $(filter iOS,$(OS)), \
|
||||
external/nss/nss-ios.patch) \
|
||||
$(if $(filter ANDROID,$(OS)), \
|
||||
|
25
external/nss/nss.getopt.patch.0
vendored
Normal file
25
external/nss/nss.getopt.patch.0
vendored
Normal file
@@ -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;
|
||||
|
Reference in New Issue
Block a user