rdrview: fix build for libxml2 2.12

This commit is contained in:
oreo639 2024-02-18 20:58:21 -08:00
parent d8dcff9855
commit f965e219ad
1 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,26 @@
From b5fdd379577e13d26784ffdeca3ecb02ff1d336e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 13:49:49 -0800
Subject: [PATCH] Add missing include with libxml2 2.12+
libxml2 2.12 removed extra includes, which causes stdlib.h to not get implicitly
included anymore.
The missing include results in a warning on gcc13 and below with the resulting
binary truncating the pointer to an integer, gcc14+ makes this a hard error.
---
src/rdrview.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/rdrview.h b/src/rdrview.h
index 9365e7a..2eda156 100644
--- a/src/rdrview.h
+++ b/src/rdrview.h
@@ -26,6 +26,7 @@
#define RDRVIEW_H
#include <assert.h>
+#include <stdlib.h>
#include <stdbool.h>
#include <sys/types.h>
#include <regex.h>