From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757946AbbE3Q0I (ORCPT ); Sat, 30 May 2015 12:26:08 -0400 Received: from mail.kapsi.fi ([217.30.184.167]:47969 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757874AbbE3QZ7 (ORCPT ); Sat, 30 May 2015 12:25:59 -0400 From: Mikko Rapeli To: linux-kernel@vger.kernel.org Cc: Mikko Rapeli , Jan Harkes , coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu, linux-api@vger.kernel.org Subject: [PATCH 96/98] HACK include/uapi/linux/coda_psdev.h: fix compilation in userspace Date: Sat, 30 May 2015 17:39:28 +0200 Message-Id: <1433000370-19509-97-git-send-email-mikko.rapeli@iki.fi> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1433000370-19509-1-git-send-email-mikko.rapeli@iki.fi> References: <1433000370-19509-1-git-send-email-mikko.rapeli@iki.fi> X-SA-Exim-Connect-IP: 2a02:8070:d18d:d800:7c0d:5e59:fd9c:b615 X-SA-Exim-Mail-From: mikko.rapeli@iki.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 +#include #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