Преглед изворни кода

Fix semun definitions for various platforms.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2228 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake пре 16 година
родитељ
комит
ae8fd0a6e0
3 измењених фајлова са 5 додато и 1 уклоњено
  1. 2 0
      configure.ac
  2. 2 0
      exec/coroipcs.c
  3. 1 1
      lib/coroipcc.c

+ 2 - 0
configure.ac

@@ -236,6 +236,8 @@ case "$host_os" in
 				   [Compiling for Solaris platform])
 		AC_DEFINE_UNQUOTED([TS_CLASS], [1],
 				   [Prevent being scheduled RR])
+		AC_DEFINE_UNQUOTED([_SEM_SEMUN_UNDEFINED], [1],
+				   [The semun structure is undefined])
 		OS_CFLAGS=""
 		OS_CPPFLAGS="-D_REENTRANT"
 		OS_LDFLAGS=""

+ 2 - 0
exec/coroipcs.c

@@ -99,12 +99,14 @@ struct zcb_mapped {
 	size_t size;
 };
 
+#if defined(_SEM_SEMUN_UNDEFINED) 
 union semun {
 	int val;
 	struct semid_ds *buf;
 	unsigned short int *array;
 	struct seminfo *__buf;
 };
+#endif
 
 enum conn_state {
 	CONN_STATE_THREAD_INACTIVE = 0,

+ 1 - 1
lib/coroipcc.c

@@ -251,7 +251,7 @@ priv_change_send (struct ipc_instance *ipc_instance)
 	return (0);
 }
 
-#if !defined(semun)
+#if defined(_SEM_SEMUN_UNDEFINED)
 union semun {
         int val;
         struct semid_ds *buf;