From mboxrd@z Thu Jan 1 00:00:00 1970 From: c.briere@samsung.com (Charles Briere) Date: Mon, 27 Oct 2014 20:49:29 +0000 Subject: [lttng-dev] [PATCH lttng-tools 13/24] Add : Compatibility layer for un.h In-Reply-To: <1414442926-14381-1-git-send-email-c.briere@samsung.com> References: <1414442926-14381-1-git-send-email-c.briere@samsung.com> Message-ID: <1414442926-14381-14-git-send-email-c.briere@samsung.com> From: Charles Briere Signed-off-by: Charles Briere --- src/common/compat/un.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/common/compat/un.h diff --git a/src/common/compat/un.h b/src/common/compat/un.h new file mode 100644 index 0000000..6c5479d --- /dev/null +++ b/src/common/compat/un.h @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2014 - Charles Briere + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License, version 2 only, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef _COMPAT_UN_H +#define _COMPAT_UN_H + +# ifdef __ANDROID__ + +#include + +#define UNIX_PATH_MAX 108 + +struct sockaddr_un { + __sa_family_t sun_family; + char sun_path[UNIX_PATH_MAX]; +}; +# else /* __ANDROID__ */ + +#include + +# endif + +#endif /* _COMPAT_UN_H */ -- 2.1.2