From af2418eb17e24565f5a764e1c9addeab304ce5dd Mon Sep 17 00:00:00 2001 From: "git@daemon.de" Date: Wed, 5 Oct 2016 11:48:22 +0200 Subject: [PATCH] fix strptime compilation error --- include/pcp/ed.h | 22 ++++++++++++++++++++++ include/pcp/key.h | 22 ++++++++++++++++++++++ include/pcp/mgmt.h | 7 ++++++- 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/include/pcp/ed.h b/include/pcp/ed.h index 316078e..e3d8fce 100644 --- a/include/pcp/ed.h +++ b/include/pcp/ed.h @@ -32,6 +32,28 @@ #include #include #include + +#if defined __linux__ || defined __GNU__ || defined __GLIBC__ +# ifndef _DEFAULT_SOURCE +# define _DEFAULT_SOURCE 1 +# endif +# +# ifndef _XOPEN_SOURCE +# define _XOPEN_SOURCE 1 +# endif +# +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif +# +# ifndef __USE_XOPEN +# define __USE_XOPEN 1 +# endif +# +#else +# define _BSD_SOURCE 1 +#endif + #include #include "defines.h" diff --git a/include/pcp/key.h b/include/pcp/key.h index 6f9e84d..f4be2df 100644 --- a/include/pcp/key.h +++ b/include/pcp/key.h @@ -26,6 +26,28 @@ #include #include #include + +#if defined __linux__ || defined __GNU__ || defined __GLIBC__ +# ifndef _DEFAULT_SOURCE +# define _DEFAULT_SOURCE 1 +# endif +# +# ifndef _XOPEN_SOURCE +# define _XOPEN_SOURCE 1 +# endif +# +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif +# +# ifndef __USE_XOPEN +# define __USE_XOPEN 1 +# endif +# +#else +# define _BSD_SOURCE 1 +#endif + #include #include diff --git a/include/pcp/mgmt.h b/include/pcp/mgmt.h index 7bdea69..964f153 100644 --- a/include/pcp/mgmt.h +++ b/include/pcp/mgmt.h @@ -1,7 +1,7 @@ /* This file is part of Pretty Curved Privacy (pcp1). - Copyright (C) 2014 T.v.Dein. + Copyright (C) 2014-2016 T.v.Dein. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -38,6 +38,11 @@ # ifndef _GNU_SOURCE # define _GNU_SOURCE 1 # endif +# +# ifndef __USE_XOPEN +# define __USE_XOPEN 1 +# endif +# #else # define _BSD_SOURCE 1 #endif