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

Fix building using clang & dev_set_address() on the BSD's #4

Merged
merged 4 commits into from Jun 3, 2014

Conversation

Projects
None yet
3 participants
@sevan
Copy link
Member

commented May 23, 2014

It was not possible to build CoovaChilli using clang
dev_set_address would fail to set an IP address on FreeBSD due to the use of a deprecated struct which has now been removed from FreeBSD 10 (it's still remains as deprecated on the others but will be removed at some point)

sevan added some commits May 23, 2014

Initial set of patches which allow Coova to be built using clang with…
…out any options enabled

src/redir.c still needs further work
	modified:   src/dhcp.c
	modified:   src/garden.c
	modified:   src/ippool.c
	modified:   src/md5.c
	modified:   src/redir.c
struct ifreq has been marked deprecated for some time in the BSDs
This struct was removed in FreeBSD 10 which meant that if you tried
to run it, a tun inteface would be created but no IP address would
be assigned.
The changes in this commit moves all BSDs & derivatives to use the
new struct ifaliasreq & leave Linux to use the pre-existing method.
The benefit on the new method that it only takes a single call to
set things up rather than 3 previously
One for IP address, subnet mask, destination address

	modified:   src/net.c

wlanmac added a commit that referenced this pull request Jun 3, 2014

Merge pull request #4 from sevan/master
Fix building using clang & dev_set_address() on the BSD's

@wlanmac wlanmac merged commit d96f5e1 into coova:master Jun 3, 2014

@matahr

This comment has been minimized.

Copy link

commented on e8be46e Jun 12, 2014

Failed to compiled in Ubuntu Trusty

redir.c: In function 'redir_main_exit':
redir.c:3194:15: error: request for member 'sslcon' in something not a structure or union
if (socket.sslcon) {
^
redir.c:3198:30: error: request for member 'sslcon' in something not a structure or union
openssl_shutdown(socket.sslcon, 2);
^
redir.c:3199:26: error: request for member 'sslcon' in something not a structure or union
openssl_free(socket.sslcon);
^
redir.c:3200:13: error: request for member 'sslcon' in something not a structure or union
socket.sslcon = 0;
^
redir.c:3201:11: error: 'rreq' undeclared (first use in this function)
if (rreq)
^

This comment has been minimized.

Copy link
Member Author

replied Jun 13, 2014

I joked recently about this
Not that I'm pleased about things breaking, just that there is more work to do, things are very badly written.
There's a pull request now pending for a fix that covers the first 4 errors you've listed, will look into the last one next.
In the meantime, if you just want things to build then don't configure --with-openssl

This comment has been minimized.

Copy link
Member Author

replied Jun 19, 2014

Just committed an amended version of src/redir.c
Can you try building with it & reporting back, if all is well, I'll generate a pull request

This comment has been minimized.

Copy link

replied Jun 19, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.