[Top][All Lists]

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

[lmi] PATCH: Trivial change to fix Linux build

From: Vadim Zeitlin
Subject: [lmi] PATCH: Trivial change to fix Linux build
Date: Sat, 27 Feb 2016 18:37:38 +0100


 Could you please apply (or let me commit it myself) the following trivial
patch allowing to compile md5.cpp successfully under Linux:

---------------------------------- >8 --------------------------------------
diff --git a/md5.cpp b/md5.cpp
index b2e568a..da399c0 100644
--- a/md5.cpp
+++ b/md5.cpp
@@ -47,6 +47,8 @@
 //# include <config.h>

+#include "config.hpp"
 #include <sys/types.h>

 /* GWC: Nullify this condition
---------------------------------- >8 --------------------------------------

This ensures that _ISOC99_SOURCE is defined in lmi config.hpp before it is
done in the standard headers included later, avoiding an error about
redefining it that I'm currently getting.

 An alternative solution could be to do the following:
---------------------------------- >8 --------------------------------------
diff --git a/config.hpp b/config.hpp
index c47f3b7..e5eecde 100644
--- a/config.hpp
+++ b/config.hpp
@@ -72,7 +72,9 @@ namespace fs = boost::filesystem;

 #if defined __GNUC__
 // This selects a correct snprintf() for MinGW-w64.
-#   define _ISOC99_SOURCE
+#   ifndef _ISOC99_SOURCE
+#       define _ISOC99_SOURCE
+#   endif
 #endif // defined __GNUC__

 // 'platform_dependent.hpp' includes standard headers in an unusual
---------------------------------- >8 --------------------------------------

but even though I have trouble thinking of anything such a change could
break, the change to md5.cpp is even narrower in scope and I hope it could
be applied sooner.

 Thanks in advance,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]