mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-10-18 03:29:50 +02:00
build: Remove hard requirement for GNU .init_array section support
In case the support is not available, just stop building the libbsd-ctor.a library, which is a nice to have thing, but should not have been a hard requirement from the start. This should allow to build libbsd on non-glibc based systems using another libc.
This commit is contained in:
@@ -31,12 +31,16 @@
|
||||
#include <string.h>
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
main(int argc, char **argv, char **envp)
|
||||
{
|
||||
const char newtitle_base[] = "test arg1 arg2";
|
||||
char *newtitle_full;
|
||||
char *envvar;
|
||||
|
||||
#ifdef TEST_USE_SETPROCTITLE_INIT
|
||||
setproctitle_init(argc, argv, envp);
|
||||
#endif
|
||||
|
||||
setproctitle("-test %s arg2", "arg1");
|
||||
assert(strcmp(argv[0], newtitle_base) == 0);
|
||||
|
||||
|
Reference in New Issue
Block a user