From e7a7324c575f9d0807dc32ca8ae95273f4615831 Mon Sep 17 00:00:00 2001 From: Angelo Mantellini Date: Wed, 9 Oct 2019 10:17:00 +0200 Subject: [CICN-21] build for arm64 ubuntu 18 Signed-off-by: Angelo Mantellini Change-Id: I9895cbfdc1c32a46d67f40310ef08c8b66b02664 --- libparc/parc/algol/parc_DisplayIndented.c | 3 +++ libparc/parc/algol/parc_Object.c | 2 ++ libparc/parc/algol/parc_Time.c | 15 +++++++++++++++ libparc/parc/algol/parc_URI.c | 3 +++ 4 files changed, 23 insertions(+) (limited to 'libparc/parc/algol') diff --git a/libparc/parc/algol/parc_DisplayIndented.c b/libparc/parc/algol/parc_DisplayIndented.c index a17e7f04..a5b9098f 100644 --- a/libparc/parc/algol/parc_DisplayIndented.c +++ b/libparc/parc/algol/parc_DisplayIndented.c @@ -27,6 +27,9 @@ #include #include +int asprintf(char **strp, const char *fmt, ...); +int vasprintf(char **strp, const char *fmt, va_list ap); + static char *_spaces = " "; static size_t _indentationFactor = 2; diff --git a/libparc/parc/algol/parc_Object.c b/libparc/parc/algol/parc_Object.c index 422a97f7..4f2b3359 100644 --- a/libparc/parc/algol/parc_Object.c +++ b/libparc/parc/algol/parc_Object.c @@ -36,6 +36,8 @@ #include #include +int asprintf(char **strp, const char *fmt, ...); + typedef struct parc_object_locking { pthread_mutex_t lock; pthread_cond_t notification; diff --git a/libparc/parc/algol/parc_Time.c b/libparc/parc/algol/parc_Time.c index 8f292c1b..7ed9ef09 100644 --- a/libparc/parc/algol/parc_Time.c +++ b/libparc/parc/algol/parc_Time.c @@ -17,6 +17,13 @@ #include #endif +#ifdef __linux__ +#if __GNUC__ >= 8 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-truncation" +#endif +#endif + #include #include #include @@ -26,6 +33,8 @@ #include #include +int asprintf(char **strp, const char *fmt, ...); + char * parcTime_TimevalAsString(struct timeval timeval) { @@ -169,3 +178,9 @@ parcTime_NowNanoseconds(void) uint64_t result = timeval.tv_sec * 1000000000 + timeval.tv_usec * 1000; return result; } + +#ifdef __linux__ +#if __GNUC__ >= 8 +#pragma GCC diagnostic pop +#endif +#endif diff --git a/libparc/parc/algol/parc_URI.c b/libparc/parc/algol/parc_URI.c index 94f74981..bac6c5f6 100644 --- a/libparc/parc/algol/parc_URI.c +++ b/libparc/parc/algol/parc_URI.c @@ -45,6 +45,9 @@ char *gen_delims = ":/?#[]@"; #define isReserved(c) (isGenDelims(c) || isSubDelims(c)) #define isPchar(c) (isUnreserved(c) || isSubDelims(c) || c == ':' || c == '@') + +int vasprintf(char **strp, const char *fmt, va_list ap); + struct parc_uri { char *scheme; char *authority; -- cgit 1.2.3-korg