sctp.h: include stdint.h in userspace

Started by Mikko Rapeli on Feb 16, 2015 · 4 messages from 3 authors · Last reply Feb 18, 2015

Subsystems (3)

Maintainers (7)

Show 3 more
STALE4282d

Revision v02 (2 revisions archived).

Revisions (2)
  1. v2
  2. v02 current [diff against previous]

open the first message on its own page

Message details and related content
Fixes compilation error:

linux/sctp.h:652:2: error: unknown type name ‘uint32_t’

Signed-off-by: Mikko Rapeli <redacted>
---
 include/uapi/linux/sctp.h | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
index ce70fe6..9fd31cf 100644
--- a/include/uapi/linux/sctp.h
+++ b/include/uapi/linux/sctp.h
@@ -53,7 +53,11 @@
 #ifndef _UAPI_SCTP_H
 #define _UAPI_SCTP_H
 
+#ifdef __KERNEL__
 #include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
 #include <linux/socket.h>
 
 typedef __s32 sctp_assoc_t;
-- 
2.1.4
Message details and related content
On Tue, Feb 17, 2015 at 12:05:23AM +0100, Mikko Rapeli wrote:
Fixes compilation error:

linux/sctp.h:652:2: error: unknown type name ‘uint32_t’

Signed-off-by: Mikko Rapeli <redacted>
Acked-by: Neil Horman <redacted>
quoted hunk
---
 include/uapi/linux/sctp.h | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
index ce70fe6..9fd31cf 100644
--- a/include/uapi/linux/sctp.h
+++ b/include/uapi/linux/sctp.h
@@ -53,7 +53,11 @@
 #ifndef _UAPI_SCTP_H
 #define _UAPI_SCTP_H
 
+#ifdef __KERNEL__
 #include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
 #include <linux/socket.h>
 
 typedef __s32 sctp_assoc_t;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Message details and related content
On Wed, Feb 18, 2015 at 04:48:04PM +0100, Daniel Borkmann wrote:
On 02/17/2015 12:05 AM, Mikko Rapeli wrote:
quoted
Fixes compilation error:

linux/sctp.h:652:2: error: unknown type name ‘uint32_t’

Signed-off-by: Mikko Rapeli <redacted>
I have no idea where the rest of this series went (neither netdev, nor
lkml, nor linux-sctp) and what user space application making use of the
header you are trying to fix !?
There is a test written to test compilation of exported kernel headers
one by one in userspace. lkml thread is here:

https://lkml.org/lkml/2015/2/16/521

The series should have gone to the right addresses with:

$ git send-email --to linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
	--cc-cmd "scripts/get_maintainer.pl --norolestats"

-Mikko
Message details and related content
On 02/17/2015 12:05 AM, Mikko Rapeli wrote:
Fixes compilation error:

linux/sctp.h:652:2: error: unknown type name ‘uint32_t’

Signed-off-by: Mikko Rapeli <redacted>
I have no idea where the rest of this series went (neither netdev, nor
lkml, nor linux-sctp) and what user space application making use of the
header you are trying to fix !?
quoted hunk
---
  include/uapi/linux/sctp.h | 4 ++++
  1 file changed, 4 insertions(+)
diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
index ce70fe6..9fd31cf 100644
--- a/include/uapi/linux/sctp.h
+++ b/include/uapi/linux/sctp.h
@@ -53,7 +53,11 @@
  #ifndef _UAPI_SCTP_H
  #define _UAPI_SCTP_H

+#ifdef __KERNEL__
  #include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
  #include <linux/socket.h>
Looks ugly, but could also be resolved in user space.
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help