Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freebsd CLOCK_MONOTONIC_RAW #20

Closed
st1905 opened this issue Mar 18, 2018 · 3 comments
Closed

Freebsd CLOCK_MONOTONIC_RAW #20

st1905 opened this issue Mar 18, 2018 · 3 comments

Comments

@st1905
Copy link

st1905 commented Mar 18, 2018

Freebsd build fails if i dont redefine CLOCK_MONOTONIC_RAW to CLOCK_MONOTONIC

(cd src; gmake clean; gmake -j 4 client) gmake[1]: Entering directory '/root/reqrypt3/src' rm -f base64.o client.o checksum.o cktp_client.o cktp_common.o cktp_encoding.o cktp_url.o config.o encodings/aes.o encodings/aes_hardware.o encodings/crypt.o encodings/pad.o encodings/natural.o http_server.o install.o log.o options.o packet.o packet_dispatch.o packet_filter.o packet_protocol.o packet_track.o random.o tunnel.o freebsd/capture.o freebsd/misc.o base64.o checksum.o config.o cktp_common.o cktp_encoding.o cktp_server.o cktp_url.o encodings/aes.o encodings/aes_hardware.o encodings/crypt.o encodings/pad.o linux/misc.o quota.o random.o server.o server_table.o http_data.c install_data.c tools/file2c gmake[1]: Leaving directory '/root/reqrypt3/src' gmake[1]: Entering directory '/root/reqrypt3/src' gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o base64.o base64.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o client.o client.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o checksum.o checksum.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o cktp_client.o cktp_client.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o cktp_common.o cktp_common.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o cktp_encoding.o cktp_encoding.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o cktp_url.o cktp_url.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o config.o config.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o encodings/aes.o encodings/aes.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -maes -mssse3 -flax-vector-conversions -c -o encodings/aes_hardware.o encodings/aes_hardware.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o encodings/crypt.o encodings/crypt.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o encodings/pad.o encodings/pad.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -O3 -c -o encodings/natural.o encodings/natural.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ tools/file2c.c -o tools/file2c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o log.o log.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o options.o options.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o packet.o packet.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o packet_dispatch.o packet_dispatch.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o packet_filter.o packet_filter.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o packet_protocol.o packet_protocol.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o packet_track.o packet_track.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o random.o random.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o tunnel.o tunnel.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o freebsd/capture.o freebsd/capture.c gcc -DCLIENT -DFREEBSD -maes -Wall -O2 -I /root/reqrypt3/src/ -c -o freebsd/misc.o freebsd/misc.c freebsd/misc.c: In function 'gettime': freebsd/misc.c:146:19: error: 'CLOCK_MONOTONIC_RAW' undeclared (first use in this function) clock_gettime(CLOCK_MONOTONIC_RAW, &ts); ^~~~~~~~~~~~~~~~~~~ freebsd/misc.c:146:19: note: each undeclared identifier is reported only once for each function it appears in <builtin>: recipe for target 'freebsd/misc.o' failed gmake[1]: *** [freebsd/misc.o] Error 1 gmake[1]: *** Waiting for unfinished jobs.... gmake[1]: Leaving directory '/root/reqrypt3/src' *** Error code 2

I added

#ifndef CLOCK_MONOTONIC_RAW #define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC #endif

in freebsd/misc.c to get around this issue.

@basil00
Copy link
Owner

basil00 commented Mar 20, 2018

Thanks for the report.

I think FreeBSD/MacOSX builds are currently broken anyway since the firewall interface has changed. See #3. But let me know if it does or does not work.

@st1905
Copy link
Author

st1905 commented Mar 21, 2018

s3
Freebsd build is not broken, it works perfectly with latest Freebsd 11.1 release. That was the only issue i have had it running.

@basil00
Copy link
Owner

basil00 commented Mar 21, 2018

Thanks for the feedback. It seems that freeBSD still uses ipfw, whereas MacOSX switched to pf. So the current ReQrypt is still compatible with FreeBSD, and it is good to get confirmation that it still works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants