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

GCC 6 reports “implicit declaration of function ‘getpid’” #11

Closed
bignose-debian opened this issue Sep 10, 2016 · 4 comments
Closed

Comments

@bignose-debian
Copy link

When compiling with GCC version 6, the compiler warns about an implicit function declaration:

$ gcc --version
gcc (Debian 6.1.1-11) 6.1.1 20160802
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gcc -DUNIX64 -c -o inform.o inform.c
In file included from inform.c:11:0:
header.h: In function ‘unique_task_id’:
header.h:457:19: warning: implicit declaration of function ‘getpid’ [-Wimplicit-function-declaration]
 {   return (int32)getpid();
                   ^~~~~~

This indicates an existing problem (functions should be explicitly declared) that was not being reported by some earlier compiler versions.

@erkyrath
Copy link
Contributor

This should already be fixed in my development tree (https://github.com/erkyrath/inform6). David has not yet merged this change.

See http://inform7.com/mantis/view.php?id=1937 for more discussion. In particular, -DUNIX64 is changing to just -DUNIX .

@bignose-debian
Copy link
Author

@DavidKinder, is this closed because there's a commit which fixes it? Which commit?

@erkyrath
Copy link
Contributor

erkyrath commented Oct 1, 2016

55ec5ec

@erkyrath
Copy link
Contributor

erkyrath commented Oct 1, 2016

Specifically the added "#include <unistd.h>" line.

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

3 participants