From 13488f892d2828d1078c52cef1f9edd20babdecc Mon Sep 17 00:00:00 2001 From: Ruoyu Zhong Date: Tue, 13 Dec 2022 18:44:44 +0800 Subject: [PATCH 1/2] src/augprint.c: Remove `#include ` `` is not present on all platforms (e.g. macOS). `` should be the place to look for `malloc`, and it has already been `#include`d. Signed-off-by: Ruoyu Zhong --- src/augprint.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/augprint.c b/src/augprint.c index dc49f003a..d976ef22a 100644 --- a/src/augprint.c +++ b/src/augprint.c @@ -69,7 +69,6 @@ #include #include #include -#include #include /* for MIN() MAX() */ #include #include "augprint.h" From 97c137dc567d121e3f082fff16000c471c68a22b Mon Sep 17 00:00:00 2001 From: Ruoyu Zhong Date: Tue, 20 Dec 2022 11:10:25 +0800 Subject: [PATCH 2/2] src/augprint.c: Add `#include ` This fixes a segfault with `augprint -h` on some non-GNU platforms. See: https://manpages.ubuntu.com/manpages/bionic/en/man3/basename.3.html Signed-off-by: Ruoyu Zhong --- src/augprint.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/augprint.c b/src/augprint.c index d976ef22a..560e1a97e 100644 --- a/src/augprint.c +++ b/src/augprint.c @@ -69,6 +69,7 @@ #include #include #include +#include /* for basename() on FreeBSD and MacOS */ #include /* for MIN() MAX() */ #include #include "augprint.h"