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:
@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user