From 2f61df05c29adadbb2a31a1905fcd4da93f846b4 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Mon, 10 Jul 2017 21:40:36 +0200 Subject: [PATCH] Fix including in strict C mode. --- libc/include/string.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libc/include/string.h b/libc/include/string.h index a6b5cc9d..882ca6a9 100644 --- a/libc/include/string.h +++ b/libc/include/string.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, 2013, 2014 Jonas 'Sortie' Termansen. + * Copyright (c) 2011, 2012, 2013, 2014, 2017 Jonas 'Sortie' Termansen. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -22,10 +22,8 @@ #include +#if __USE_SORTIX || __USE_POSIX #include - -#ifdef __cplusplus -extern "C" { #endif #ifndef NULL @@ -49,6 +47,10 @@ typedef __locale_t locale_t; #endif #endif +#ifdef __cplusplus +extern "C" { +#endif + void* memchr(const void*, int, size_t); int memcmp(const void*, const void*, size_t); void* memcpy(void* __restrict, const void* __restrict, size_t);