]> git.kaiwu.me - njs.git/commitdiff
A build with -Werror=old-style-definition has been fixed.
authorIgor Sysoev <igor@sysoev.ru>
Mon, 24 Oct 2016 14:16:10 +0000 (17:16 +0300)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 24 Oct 2016 14:16:10 +0000 (17:16 +0300)
Patch by Piotr Sikora.

nxt/auto/clang
nxt/auto/getrandom
nxt/auto/memalign
nxt/auto/pcre
nxt/auto/time

index e20efd030bd6ae786afa9663cf03da2f912f933a..a67a92a0f27cb4a030497332b85a70db0c2b78ad 100644 (file)
@@ -185,7 +185,7 @@ nxt_feature_name=NXT_HAVE_BUILTIN_UNREACHABLE
 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_PREFETCH
 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
index 9f94fbd7066ef40474057bb7062d906360e9773c..d54110b17c4b0351f78d28433f4b28a1dd22b2da 100644 (file)
@@ -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);
index 82d34d378ba519f1fb461f9645646d62a399ae4d..8aa59d14a0df56f68668075cdd6952b24fc9e569 100644 (file)
@@ -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;
index ac9a6cc95a635272cef2a418699c87e67ce80baa..4e15d57c525bb3361230106b667d41b5ee06da6c 100644 (file)
@@ -20,7 +20,7 @@ if /bin/sh -c "(pcre-config --version)" >> $NXT_AUTOCONF_ERR 2>&1; then
     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);
index 5559a7550b75a133fd9000a94a668e538556a15f..2ba4e0056043a173147a5eb287e09d0eaa612ac8 100644 (file)
@@ -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;
                   }"