lkml.org 
[lkml]   [2015]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 96/98] HACK include/uapi/linux/coda_psdev.h: fix compilation in userspace
Date
Include linux/coda.h for caddr_t and use unsigned short type directly.
Userspace headers do not have list_head and wait_queue_head_t so just
ifdef them away which is a HACK. Any ideas how to fix this properly?

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
include/uapi/linux/coda_psdev.h | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/include/uapi/linux/coda_psdev.h b/include/uapi/linux/coda_psdev.h
index 79d0598..50e49f8 100644
--- a/include/uapi/linux/coda_psdev.h
+++ b/include/uapi/linux/coda_psdev.h
@@ -2,6 +2,7 @@
#define _UAPI__CODA_PSDEV_H

#include <linux/magic.h>
+#include <linux/coda.h>

#define CODA_PSDEV_MAJOR 67
#define MAX_CODADEVS 5 /* how many do we allow */
@@ -9,14 +10,18 @@

/* messages between coda filesystem in kernel and Venus */
struct upc_req {
+#ifdef __KERNEL__
struct list_head uc_chain;
+#endif /* __KERNEL__ */
caddr_t uc_data;
- u_short uc_flags;
- u_short uc_inSize; /* Size is at most 5000 bytes */
- u_short uc_outSize;
- u_short uc_opcode; /* copied from data to save lookup */
+ unsigned short uc_flags;
+ unsigned short uc_inSize; /* Size is at most 5000 bytes */
+ unsigned short uc_outSize;
+ unsigned short uc_opcode; /* copied from data to save lookup */
int uc_unique;
+#ifdef __KERNEL__
wait_queue_head_t uc_sleep; /* process' wait queue */
+#endif /* __KERNEL__ */
};

#define CODA_REQ_ASYNC 0x1
--
2.1.4


\
 
 \ /
  Last update: 2015-05-30 19:01    [W:0.519 / U:0.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site