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:
Guillem Jover
2014-07-20 01:48:20 +02:00
parent faa005cb32
commit e8d3d04177
5 changed files with 23 additions and 7 deletions

View File

@@ -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);