Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build of tnm fails with -Werror=implicit-function-declaration #13

Open
cooljeanius opened this issue Aug 10, 2022 · 1 comment
Open

Comments

@cooljeanius
Copy link

Apple has been shipping its versions of clang with -Werror=implicit-function-declaration enabled by default for awhile now, which leads to the following build failure for tnm:

gcc -DHAVE_CONFIG_H  -I. -Igeneric -Isnmp -I"/Library/Frameworks/Tcl.framework/Headers"    -g -O2 -pipe  -Os -DNDEBUG -Wall -fno-common   -c `echo mount_clnt.c` -o mount_clnt.o
mount_clnt.c:18:2: error: implicitly declaring library function 'memset' with type 'void *(void *, int, unsigned long)' [-Werror,-Wimplicit-function-declaration]
        memset((char *)&clnt_res, 0, sizeof(clnt_res));
        ^

Fixing it should be easy; just add a line like

#include <string.h>

to either mount_clnt.c or mount.h.
Originally reported to MacPorts here: https://trac.macports.org/ticket/63332

@cooljeanius
Copy link
Author

I tried working around this in my fork in cooljeanius#2 and cooljeanius/scotty@ec8df63, but it looks like it's going to require learning how rpcgen works to actually fix this properly...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant