netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mnl: getpagesize
@ 2010-12-20  0:44 Jan Engelhardt
  2010-12-20  0:44 ` [PATCH] include: add missing unistd.h Jan Engelhardt
  2010-12-21 19:39 ` mnl: getpagesize Pablo Neira Ayuso
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Engelhardt @ 2010-12-20  0:44 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel


Hi Pablo,

here is a patch for a compile error about missing getpagesize.

I also have this now:
mystuff.c:36:7: error: variably modified ‘buf’ at file scope

This is due to

struct def {
	char buf[MNL_SOCKET_BUFFER_SIZE];
};

This worked before mnl started using getpagesize :-/



The following changes since commit 093044ed01a91541c46ba9cc987fae5e907132b1:

  doc: add new website at netfilter.org to doxygen (2010-12-17 15:45:00 +0100)

are available in the git repository at:
  git://dev.medozas.de/libmnl master

Jan Engelhardt (1):
      include: add missing unistd.h

 include/libmnl/libmnl.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] include: add missing unistd.h
  2010-12-20  0:44 mnl: getpagesize Jan Engelhardt
@ 2010-12-20  0:44 ` Jan Engelhardt
  2010-12-21 19:39 ` mnl: getpagesize Pablo Neira Ayuso
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Engelhardt @ 2010-12-20  0:44 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

When a project uses MNL_SOCKET_BUFFER_SIZE without having included
unistd.h, it gets:

mystuff.c:36:2: warning: implicit declaration of function "getpagesize"

It is libmnl's job to include this, since mystuff.c did not use
getpagesize anywhere.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 include/libmnl/libmnl.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/libmnl/libmnl.h b/include/libmnl/libmnl.h
index 78fd0c4..3e69629 100644
--- a/include/libmnl/libmnl.h
+++ b/include/libmnl/libmnl.h
@@ -9,6 +9,7 @@
 #	include <stdio.h>
 #	include <stdint.h>
 #endif
+#include <unistd.h>
 #include <sys/socket.h> /* for sa_family_t */
 #include <linux/netlink.h>
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: mnl: getpagesize
  2010-12-20  0:44 mnl: getpagesize Jan Engelhardt
  2010-12-20  0:44 ` [PATCH] include: add missing unistd.h Jan Engelhardt
@ 2010-12-21 19:39 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2010-12-21 19:39 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: netfilter-devel

On 20/12/10 01:44, Jan Engelhardt wrote:
> git://dev.medozas.de/libmnl master

I have also applied this, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-21 19:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-20  0:44 mnl: getpagesize Jan Engelhardt
2010-12-20  0:44 ` [PATCH] include: add missing unistd.h Jan Engelhardt
2010-12-21 19:39 ` mnl: getpagesize Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).