sure.
Regards.
On Sat, 14 May 2022 at 16:32, Willy Tarreau wrote:
>
> Hi David,
>
> > From 5b175adfa5ef9ab52ce69f7eb6775efe8a828974 Mon Sep 17 00:00:00 2001
> > From: David Carlier
> > Date: Fri, 13 May 2022 20:16:15 +0100
> > Subject: [PATCH] BUILD/MINOR: few solaris updates.
> >
> > - get_exec_path using getexecname, fetching AT_SUN_EXECNAME from the
> > auxiliary vectors.
> > - __maybe_unused already defined.
>
> Please split it in two, as it really addresses two completely independent
> things. It seems that the former improves error reporting while the
> second one is a build fix.
>
> Thanks,
> Willy
From fdc0ec787c050a05bac7d4ae5fdd9d159c38ad16 Mon Sep 17 00:00:00 2001
From: David Carlier
Date: Sat, 14 May 2022 17:10:50 +0100
Subject: [PATCH] BUILD/MINOR: fix build warning on solaris based systems.
__maybe_unused is already defined.
---
include/haproxy/compiler.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/haproxy/compiler.h b/include/haproxy/compiler.h
index 49356daab..a935ac3b5 100644
--- a/include/haproxy/compiler.h
+++ b/include/haproxy/compiler.h
@@ -58,10 +58,12 @@
#endif
#endif
+#ifndef __maybe_unused
/* silence the "unused" warnings without having to place painful #ifdefs.
* For use with variables or functions.
*/
#define __maybe_unused __attribute__((unused))
+#endif
/* These macros are used to declare a section name for a variable.
* WARNING: keep section names short, as MacOS limits them to 16 characters.
--
2.34.1
From 765054a26a58866a7a9d290597e375f9f077b3f2 Mon Sep 17 00:00:00 2001
From: David Carlier
Date: Sat, 14 May 2022 17:15:49 +0100
Subject: [PATCH] BUILD/MINOR: get_exec_path implementation for solaris based
systems.
using getexecname which fetches AT_SUN_EXECNAME from the auxiliary
vectors.
---
src/tools.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/tools.c b/src/tools.c
index ed3c3a667..c6bc81be9 100644
--- a/src/tools.c
+++ b/src/tools.c
@@ -4821,6 +4821,8 @@ const char *get_exec_path()
break;
}
}
+#elif defined(__sun)
+ ret = getexecname();
#endif
return ret;
}
--
2.34.1