[PATCH] Configure: fix build with -Werror=old-style-definition
Piotr Sikora
piotrsikora at google.com
Mon Oct 17 10:06:55 UTC 2016
# HG changeset patch
# User Piotr Sikora <piotrsikora at google.com>
# Date 1476698419 25200
# Mon Oct 17 03:00:19 2016 -0700
# Node ID ec3df1ebada2b25409fcba4502f1267640f43a76
# Parent 8046b999aaaf95980e89a6d0620657bc4123342b
Configure: fix build with -Werror=old-style-definition.
Signed-off-by: Piotr Sikora <piotrsikora at google.com>
diff -r 8046b999aaaf -r ec3df1ebada2 nxt/auto/clang
--- a/nxt/auto/clang
+++ b/nxt/auto/clang
@@ -185,7 +185,7 @@ nxt_feature_name=NXT_HAVE_BUILTIN_UNREAC
nxt_feature_run=no
nxt_feature_incs=
nxt_feature_libs=
-nxt_feature_test="int main() {
+nxt_feature_test="int main(void) {
__builtin_unreachable();
}"
. ${NXT_AUTO}feature
@@ -196,7 +196,7 @@ nxt_feature_name=NXT_HAVE_BUILTIN_PREFET
nxt_feature_run=no
nxt_feature_incs=
nxt_feature_libs=
-nxt_feature_test="int main() {
+nxt_feature_test="int main(void) {
__builtin_prefetch(0);
}"
. ${NXT_AUTO}feature
@@ -209,7 +209,7 @@ nxt_feature_path=
nxt_feature_libs=
nxt_feature_test="int n __attribute__ ((visibility(\"default\")));
- int main() {
+ int main(void) {
return 1;
}"
. ${NXT_AUTO}feature
@@ -228,7 +228,7 @@ nxt_feature_test="#include <stdlib.h>
return malloc(1);
}
- int main() {
+ int main(void) {
if (f() != NULL) {
return 1;
}
@@ -255,7 +255,7 @@ else
nxt_feature_libs=
nxt_feature_test="int n __attribute__ ((aligned(64)));
- int main() {
+ int main(void) {
return 1;
}"
. ${NXT_AUTO}feature
diff -r 8046b999aaaf -r ec3df1ebada2 nxt/auto/getrandom
--- a/nxt/auto/getrandom
+++ b/nxt/auto/getrandom
@@ -14,7 +14,7 @@ nxt_feature_test="#include <unistd.h>
#include <sys/syscall.h>
#include <linux/random.h>
- int main() {
+ int main(void) {
char buf[4];
(void) syscall(SYS_getrandom, buf, 4, 0);
diff -r 8046b999aaaf -r ec3df1ebada2 nxt/auto/memalign
--- a/nxt/auto/memalign
+++ b/nxt/auto/memalign
@@ -13,7 +13,7 @@ nxt_feature_incs=
nxt_feature_libs=
nxt_feature_test="#include <stdlib.h>
- int main() {
+ int main(void) {
void *p;
if (posix_memalign(&p, 4096, 4096) != 0)
@@ -34,7 +34,7 @@ if [ $nxt_found = no ]; then
nxt_feature_libs=
nxt_feature_test="#include <stdlib.h>
- int main() {
+ int main(void) {
if (memalign(4096, 4096) == NULL)
return 1;
return 0;
diff -r 8046b999aaaf -r ec3df1ebada2 nxt/auto/pcre
--- a/nxt/auto/pcre
+++ b/nxt/auto/pcre
@@ -20,7 +20,7 @@ if /bin/sh -c "(pcre-config --version)"
nxt_feature_libs=$NXT_PCRE_LIB
nxt_feature_test="#include <pcre.h>
- int main() {
+ int main(void) {
pcre *re;
re = pcre_compile(NULL, 0, NULL, 0, NULL);
diff -r 8046b999aaaf -r ec3df1ebada2 nxt/auto/time
--- a/nxt/auto/time
+++ b/nxt/auto/time
@@ -12,7 +12,7 @@ nxt_feature_incs=
nxt_feature_libs=
nxt_feature_test="#include <time.h>
- int main() {
+ int main(void) {
time_t t;
struct tm tm;
@@ -32,7 +32,7 @@ nxt_feature_incs=
nxt_feature_libs=
nxt_feature_test="#include <time.h>
- int main() {
+ int main(void) {
altzone = 0;
return 0;
}"
More information about the nginx-devel
mailing list