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

acinclude.m4: Fix -Werror=implicit-function-declaration #40

Merged
merged 1 commit into from
Apr 28, 2024

Conversation

elboulangero
Copy link
Contributor

checking snprintf format for long long int... none
configure: error: cannot determine snprintf format string for long long int

...

configure:5765: checking snprintf format for long long int
configure:5803: gcc -o conftest -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -Wshadow -Wwrite-strings -Wextra -fstack-protector -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now conftest.c  >&5
conftest.c: In function 'does_int64_snprintf_work':
conftest.c:58:7: error: implicit declaration of function 'strcmp' [-Werror=implicit-function-declaration]
   58 |   if (strcmp(buf, "800000140000005") != 0)
      |       ^~~~~~
conftest.c:42:1: note: include '<string.h>' or provide a declaration of 'strcmp'
   41 | #include <stdio.h>
  +++ |+#include <string.h>
   42 | typedef long long int int64;
conftest.c: At top level:
conftest.c:62:1: warning: return type defaults to 'int' [-Wimplicit-int]
   62 | main() {
      | ^~~~
cc1: some warnings being treated as errors

Initially reported on the Debian bugtracker: https://bugs.debian.org/1065969

```
checking snprintf format for long long int... none
configure: error: cannot determine snprintf format string for long long int

...

configure:5765: checking snprintf format for long long int
configure:5803: gcc -o conftest -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -Wshadow -Wwrite-strings -Wextra -fstack-protector -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now conftest.c  >&5
conftest.c: In function 'does_int64_snprintf_work':
conftest.c:58:7: error: implicit declaration of function 'strcmp' [-Werror=implicit-function-declaration]
   58 |   if (strcmp(buf, "800000140000005") != 0)
      |       ^~~~~~
conftest.c:42:1: note: include '<string.h>' or provide a declaration of 'strcmp'
   41 | #include <stdio.h>
  +++ |+#include <string.h>
   42 | typedef long long int int64;
conftest.c: At top level:
conftest.c:62:1: warning: return type defaults to 'int' [-Wimplicit-int]
   62 | main() {
      | ^~~~
cc1: some warnings being treated as errors
```

Initially reported on the Debian bugtracker: https://bugs.debian.org/1065969
@coveralls
Copy link

Coverage Status

coverage: 76.647% (+0.4%) from 76.229%
when pulling 3630f3e on elboulangero:master
into 9df6145 on royhills:master.

@royhills royhills merged commit d5737c9 into royhills:master Apr 28, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

3 participants