[MacPorts] #62631: fuzz @0.6_1: implicitly declaring library function 'strcmp' with type 'int (const char *, const char *)' [-Werror, -Wimplicit-function-declaration]
MacPorts
noreply at macports.org
Wed Jun 30 03:48:04 UTC 2021
#62631: fuzz @0.6_1: implicitly declaring library function 'strcmp' with type 'int
(const char *, const char *)' [-Werror,-Wimplicit-function-declaration]
--------------------------+--------------------
Reporter: c-kloukinas | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.6.4
Resolution: | Keywords: BigSur
Port: fuzz |
--------------------------+--------------------
Comment (by cooljeanius):
I'm pretty sure this is in the same `getopt.c` file that has been patched
in other ports; if so, it should be pretty easy to fix here, as well.
Here's my output:
{{{
/usr/bin/clang -DPACKAGE=\"fuzz\" -DVERSION=\"0.6\" -DHAVE_LIBREADLINE=1
-DHAVE_SYS_WAIT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_UNISTD_H=1 -DRETSIGTYPE=void
-DHAVE_GETCWD=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_SNPRINTF=1 -I.
-I. -I/opt/local/include
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -pipe -Os
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64
-c getopt.c
getopt.c:580:30: error: implicitly declaring library function 'strcmp'
with type 'int (const char *, const char *)' [-Werror,-Wimplicit-function-
declaration]
if (optind != argc && !strcmp (argv[optind], "--"))
^
getopt.c:580:30: note: include the header <string.h> or explicitly provide
a declaration for 'strcmp'
getopt.c:656:7: error: implicitly declaring library function 'strncmp'
with type 'int (const char *, const char *, unsigned long)' [-Werror
,-Wimplicit-function-declaration]
if (!strncmp (p->name, nextchar, nameend - nextchar))
^
getopt.c:656:7: note: include the header <string.h> or explicitly provide
a declaration for 'strncmp'
getopt.c:659:21: error: implicitly declaring library function 'strlen'
with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-
declaration]
== (unsigned int) strlen (p->name))
^
getopt.c:659:21: note: include the header <string.h> or explicitly provide
a declaration for 'strlen'
getopt.c:707:6: warning: add explicit braces to avoid dangling else
[-Wdangling-else]
else
^
1 warning and 3 errors generated.
make: *** [getopt.o] Error 1
make: Leaving directory
`/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_fuzz/fuzz/work/fuzz-0.6'
Command failed: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_fuzz/fuzz/work/fuzz-0.6"
&& /usr/bin/make -j16 -w all
Exit code: 2
Error: Failed to build fuzz: command execution failed
DEBUG: Error code: CHILDSTATUS 54557 2
}}}
--
Ticket URL: <https://trac.macports.org/ticket/62631#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list