summaryrefslogtreecommitdiff
path: root/source3/wscript
diff options
context:
space:
mode:
authorJoseph Sutton <josephsutton@catalyst.net.nz>2022-11-02 14:57:03 +1300
committerAndrew Bartlett <abartlet@samba.org>2023-03-03 01:07:36 +0000
commitb73622bf53f3f46ad6678f6b6a7f90e498c0e752 (patch)
treecac543f21104723605beb59d04ea4f83bc49ef65 /source3/wscript
parentfb781f426b77ae192b97bd3f7b42260d1e315e29 (diff)
downloadsamba-b73622bf53f3f46ad6678f6b6a7f90e498c0e752.tar.gz
source3/wscript: Fix configure-time checks
Compilers are getting strict about this C89 behaviour and this kind of thing is already causing some configure checks to fail with modern compilers like clang. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15281 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/wscript')
-rw-r--r--source3/wscript10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/wscript b/source3/wscript
index 71378796344..58c7e2aecaf 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1086,7 +1086,7 @@ syscall(SYS_setgroups32, 0, NULL);
#define DATA "ofdtest.fcntl"
-int main() {
+int main(void) {
struct flock lck = {
.l_whence = SEEK_SET,
.l_type = F_WRLCK,
@@ -1315,7 +1315,7 @@ syscall(SYS_initgroups, 16, NULL, NULL, 0);
if conf.CHECK_CODE('''
#include <time.h>
-int main() {
+int main(void) {
struct tm *tm;
if (sizeof(time_t) == 8) {
time_t max_time = 0x7fffffffffffffffll;
@@ -1346,7 +1346,7 @@ int main() {
#if defined(HAVE_SYS_SYSMACROS_H)
#include <sys/sysmacros.h>
#endif
-int main() { dev_t dev = makedev(1,2); return 0; }
+int main(void) { dev_t dev = makedev(1,2); return 0; }
''',
'HAVE_MAKEDEV',
addmain=False,
@@ -1362,7 +1362,7 @@ void exit_on_core(int ignored) {
exit(1);
}
-int main() {
+int main(void) {
char *newpath;
signal(SIGSEGV, exit_on_core);
newpath = realpath("/tmp", NULL);
@@ -1519,7 +1519,7 @@ int main() {
# Check for getcwd allowing a NULL arg.
conf.CHECK_CODE('''
#include <unistd.h>
-int main() {
+int main(void) {
char *s = getcwd(NULL,0);
return s != NULL ? 0 : 1;
}''', 'GETCWD_TAKES_NULL', addmain=False, execute=True,