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
Add cmake support #39
Conversation
@@ -126,6 +126,7 @@ struct list_node *list_check_node(const struct list_node *n, | |||
* Example: | |||
* static LIST_HEAD(my_global_list); | |||
*/ | |||
#undef LIST_HEAD |
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.
remove warning here:
./ccan/list/list.h:129:9: warning: 'LIST_HEAD' macro redefined [-Wmacro-redefined]
#define LIST_HEAD(name)
^
/usr/include/sys/queue.h:417:9: note: previous definition is here
#define LIST_HEAD(name, type)
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.
You should not just #undef a macro. The question is why is sys/queue.h included?
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.
#include <sys/queue.h> /* get TAILQ macros */
"/usr/include/net/if_var.h" [readonly] 235L, 9394C
if.h 108 #include <net/if_var.h>
It comes from if.h which includes if_var.h
On OSX, using Makefile still having error, i just don't know how to fix that make PCAP=1 WEXT=0 LIBNL=0 #include <ccan/str/str.h> |
I appreciate your work but, sorry, I can not merge this. I will fix up the errors I introduced while extending channels recently. Please check back soon. Also I'm not convinced that using cmake is necessary for a better solution. What exactly do you need it for? |
I pushed my changes. Can you please try again? Please compile with |
Still having some errors below: JIANFU-M-M0AH:horst jeromy$ make LIBNL=0 PCAP=1 |
It's fine it's not get merged, it's a little bit over weight. Thanks! |
So, first, the errors you see come from the automatic dependency generation, which is not strictly necessary. As you see, later you get some warnings but the program compiles fine.
|
add -I. works, thanks! BTW, I've added ifctrl-osx.m, i don't figure out how to change makefile yet, i've compiled using cmake and it seems to work now. |
Hi, i have some changes and some comments, also questions here: JiantaoFu@0c0bf9f#diff-e460e33e58be499632b5d424bc9d1127R229, could you help take a look, thanks |
Hi! I have added my comments, but it's a bit hard to review your stuff because you mix everything together. Better to make one commit for each and explain the issue well in the commit log... For example the ++new_idx; thing is a bugfix which is completely independent of the rest, and for which it would be good to send a separate pull request for. Now I have added that to horst already, thanks to your finding! Thanks! Also I recommend you should rebase (re-apply your changes) on top of the latest horst git. BTW are you JiantaoFu, Jeromy or fuji246, or are you several people... ;) |
Yeah, those are all me. I've submitted another pull request for osx support |
BTW, there is still another bug in channel.c diff --git a/channel.c b/channel.c
|
I have validate this in both osx and linux, with the following options: -DWEXT -DPCAP -DLIBNL, also fix some compile errors and warnings.