Add support for non-glibc systems

MaxScale can now be built on systems that use an alternative libc
implementation e.g. musl.
This commit is contained in:
Markus Mäkelä
2017-07-28 14:14:47 +03:00
parent 782b8db2aa
commit 854c4a1ed3
17 changed files with 104 additions and 77 deletions

View File

@ -35,6 +35,7 @@
#include "maxscale/secrets.h"
#ifdef HAVE_GLIBC
struct option options[] =
{
{
@ -45,6 +46,7 @@ struct option options[] =
},
{ NULL, 0, NULL, 0 }
};
#endif
void print_usage(const char* executable, const char* directory)
{
@ -107,7 +109,11 @@ int main(int argc, char **argv)
const char* path = get_datadir();
int c;
#ifdef HAVE_GLIBC
while ((c = getopt_long(argc, argv, "h", options, NULL)) != -1)
#else
while ((c = getopt(argc, argv, "h")) != -1)
#endif
{
switch (c)
{