Setting tag sliver-openvswitch-2.2.90-1
[sliver-openvswitch.git] / include / linux / types.h
index 4579add..d8b993b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 Nicira Networks.
+ * Copyright (c) 2011 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * <linux/types.h> to allow <linux/openvswitch.h> to work, that is, it defines
  * the __u<N> and __be<N> types. */
 
-#if __KERNEL__ || HAVE_LINUX_TYPES_H
+#ifdef __KERNEL__
+#include_next <linux/types.h>
+#elif defined(HAVE_LINUX_TYPES_H)
+/* With some combinations of kernel and userspace headers, including both
+ * <sys/types.h> and <linux/types.h> only works if you do so in that order, so
+ * force it.  */
+
+#ifdef __CHECKER__
+#define __CHECK_ENDIAN__
+#endif
+
+#include <sys/types.h>
 #include_next <linux/types.h>
 #else  /* no <linux/types.h> */
 #include <stdint.h>
@@ -44,4 +55,8 @@ typedef uint32_t __bitwise__ __be32;
 typedef uint64_t __bitwise__ __be64;
 #endif /* no <linux/types.h> */
 
+#ifndef _WIN32
+typedef __u32 HANDLE;
+#endif
+
 #endif /* <linux/types.h> */