[dia] Bug #585004 - implicit declaration of function 'fchmod'



commit d32d3b0abce444e51d74b9b1ee304c27f5fe8dd2
Author: Hans Breuer <hans breuer org>
Date:   Sat Jun 6 20:03:40 2009 +0200

    Bug #585004 - implicit declaration of function 'fchmod'
    
    Need to also add _BSD_SOURCE define before inclsuion of sys/stat.h
---
 app/load_save.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/app/load_save.c b/app/load_save.c
index f85d762..d8c7586 100644
--- a/app/load_save.c
+++ b/app/load_save.c
@@ -19,12 +19,13 @@
 
 /* so we get fdopen declared even when compiling with -ansi */
 #define _POSIX_C_SOURCE 2
+#define _BSD_SOURCE 1 /* to get the prototype for fchmod() */
+#include <sys/stat.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 #include <stdlib.h>
 #include <sys/types.h>
-#include <sys/stat.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <string.h>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]