]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix --enable-checking build with macOS clang 15.0.0
authorNaofumi Yasufuku <naofumi@yasufuku.dev>
Sun, 26 May 2024 08:53:42 +0000 (17:53 +0900)
committerEshel Yaron <me@eshelyaron.com>
Mon, 27 May 2024 20:26:34 +0000 (22:26 +0200)
search.c:3428:7: error: call to undeclared library function 'free' ...

configure:9131: checking for C compiler version
configure:9140: gcc --version >&5
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

* src/search.c: Include stdlib.h for free(), and stdio.h for
open_memstream(), fclose().

Copyright-paperwork-exempt: yes
(cherry picked from commit 3ea451042a34a44da94176f27ea354e6823e68ee)

src/search.c

index b092d5b7fef438b44310d8304c5db27862b22789..3c07933b5da506e7a21d3988a30992d55acca816 100644 (file)
@@ -21,6 +21,9 @@ along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
+#include <stdio.h>
+#include <stdlib.h>
+
 #include "lisp.h"
 #include "character.h"
 #include "buffer.h"