[dia/dia-0-97] Bug 726458 - Fix build problem on FreeBSD



commit 20ba42ae04725a5ea71ace60da5255632957fbce
Author: Ting-Wei Lan <lantw44 gmail com>
Date:   Sun Mar 16 23:16:24 2014 +0800

    Bug 726458 - Fix build problem on FreeBSD
    
    Define _BSD_SOURCE does not make fchmod() available on FreeBSD. Change
    _POSIX_C_SOURCE to 200809L so we can build it on FreeBSD.
    
    Signed-off-by: Hans Breuer <hans breuer org>
    (cherry picked from commit 4e948cc8fca17ff2ae4b961defc0f48ad78bae6d)
    
    Conflicts:
        app/load_save.c

 app/load_save.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/app/load_save.c b/app/load_save.c
index 460057a..0940481 100644
--- a/app/load_save.c
+++ b/app/load_save.c
@@ -17,8 +17,10 @@
  */
 #include <config.h>
 
-#define _BSD_SOURCE 1 /* to get the prototype for fchmod() from sys/stat.h */
-#define _POSIX_C_SOURCE 2 /* so we get fdopen declared even when compiling with -ansi */
+/* so we get fdopen declared even when compiling with -ansi */
+#define _POSIX_C_SOURCE 200809L
+#define _BSD_SOURCE 1 /* to get the prototype for fchmod() */
+
 #include <sys/stat.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>


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