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
common: include: Redo some includes for FreeBSD #15337
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
#include "include/ipaddr.h" | ||
|
||
#include <arpa/inet.h> | ||
#include <ifaddrs.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
#if defined(__FreeBSD__) | ||
#include <sys/types.h> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have just noticed that this is newly added. But It is fine, if it is necessary in FreeBSD. |
||
#include <sys/socket.h> | ||
#include <netinet/in.h> | ||
#endif | ||
|
||
#include "include/ipaddr.h" | ||
|
||
static void netmask_ipv4(const struct in_addr *addr, | ||
unsigned int prefix_len, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,9 @@ | |
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
#if defined(__FreeBSD__) | ||
#include <sys/wait.h> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have just noticed that this is newly added. But It is fine, if it is necessary in FreeBSD. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @joscollin |
||
#endif | ||
|
||
/* | ||
* TODO: Switch to libkmod when we abandon older platforms. The APIs | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any problem making it similar ? I mean putting an
#ifdef
, which is similar to the other checks (linux)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joscollin
I've been using
#if defined()
for all my submissions.This will allow me an easy grep to find all typical FreeBSD stuff.
And in the whole code there is a mismatch of all the possible forms.