From 95bcd5667ed6f3732ee09cb94e4b24825975a816 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Mon, 10 Jul 2017 21:35:59 +0200 Subject: [PATCH] Fix not defining NULL. --- libc/include/locale.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libc/include/locale.h b/libc/include/locale.h index a90c120a..7d5c94c3 100644 --- a/libc/include/locale.h +++ b/libc/include/locale.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015 Jonas 'Sortie' Termansen. + * Copyright (c) 2012, 2015, 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,9 @@ #include -#include - -#ifdef __cplusplus -extern "C" { +#ifndef NULL +#define __need_NULL +#include #endif struct lconv @@ -65,6 +64,10 @@ struct lconv #define LC_ALL 6 #define LC_NUM_CATEGORIES LC_ALL +#ifdef __cplusplus +extern "C" { +#endif + char* setlocale(int category, const char* locale); struct lconv* localeconv(void);