1From 34996ad1eb6d295382e7737ef34bd362abdd4944 Mon Sep 17 00:00:00 2001 2From: Fabrice Fontaine <fontaine.fabrice@gmail.com> 3Date: Tue, 19 Jan 2021 22:15:45 +0100 4Subject: [PATCH] photosyst.c: fix build on musl 5MIME-Version: 1.0 6Content-Type: text/plain; charset=UTF-8 7Content-Transfer-Encoding: 8bit 8 9Build on musl is broken since version 2.6.0 and 10https://github.com/Atoptool/atop/commit/e889c66fbe1d0b7ae38fbcbaa46cea749257f486 11because limits.h is not included: 12 13photosyst.c: In function ‘lvmmapname’: 14photosyst.c:1624:14: error: ‘PATH_MAX’ undeclared (first use in this function); did you mean ‘AF_MAX’? 15 char path[PATH_MAX]; 16 ^~~~~~~~ 17 AF_MAX 18 19Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 20--- 21 photosyst.c | 1 + 22 1 file changed, 1 insertion(+) 23 24diff --git a/photosyst.c b/photosyst.c 25index 3de874b..67ae92f 100644 26--- a/photosyst.c 27+++ b/photosyst.c 28@@ -165,6 +165,7 @@ 29 #include <dirent.h> 30 #include <sys/ioctl.h> 31 #include <sys/sysmacros.h> 32+#include <limits.h> 33 34 #define SCALINGMAXCPU 8 // threshold for scaling info per CPU 35 36-- 372.29.2 38 39