Skip to content

Build fails with IPv6 support #74

@clausecker

Description

@clausecker

When trying to build version 8.2.6 with IPv6 support, the build fails with an undefined symbol bindPort:

cc -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing -fstack-protector-strong -o conserver access.o client.o consent.o group.o main.o master.o  readcfg.o fallback.o cutil.o -lbsm -lutil -lcrypt  -lssl -lcrypto  -lwrap -lpam
ld: error: undefined symbol: bindPort
>>> referenced by readcfg.c
>>>               readcfg.o:(ReReadCfg)
>>> referenced by readcfg.c
>>>               readcfg.o:(ReReadCfg)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make[3]: stopped in /usr/home/fuz.ports/comms/conserver-com/work/conserver-8.2.6/conserver

This appears to be because main.c doesn't define bindPort when IPv6 support is present, but the code to set the process title still requires the variable. I did not attempt a fix because the code is very convoluted and I don't want to break it.

There also seems to be a problem in another place where the code attempts to use config->primaryport in lieu of bindPort, but then fails to adjust the format string or to apply atoi:

cc -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing -I.. -I.. -I. -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc\" -c -o main.o main.c
main.c:1773:5: warning: format specifies type 'unsigned short' but the argument has type 'char *' [-Wformat]
                         config->primaryport,
                         ^~~~~~~~~~~~~~~~~~~
1 warning generated.

Please fix this, too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions