about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2005-09-29 20:44:44 +0000
committerRoland McGrath <roland@gnu.org>2005-09-29 20:44:44 +0000
commitc704fb3b0f1843f1ef07b6ac9ff46d9a36129d22 (patch)
tree3a68f8c60fbd18212e35ec0c365f0e9b5324fd9c /posix
parentdf811ccf028ee73a9affe643b5f0c3ac55ef2ae8 (diff)
downloadglibc-c704fb3b0f1843f1ef07b6ac9ff46d9a36129d22.tar.gz
glibc-c704fb3b0f1843f1ef07b6ac9ff46d9a36129d22.tar.xz
glibc-c704fb3b0f1843f1ef07b6ac9ff46d9a36129d22.zip
[BZ #1392]
2005-09-29  Roland McGrath  <roland@redhat.com>
	[BZ #1392]
	* posix/sys/wait.h (__WAIT_INT): Rewrite using an initializer,
	in case __typeof yields a const-qualified type.
Diffstat (limited to 'posix')
-rw-r--r--posix/sys/wait.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/posix/sys/wait.h b/posix/sys/wait.h
index 372d46c79a..31afa65703 100644
--- a/posix/sys/wait.h
+++ b/posix/sys/wait.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991-1994,1996-2001,2003,2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1994,1996-2001,2003,2004,2005
+	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -42,9 +43,9 @@ __BEGIN_DECLS
    as well as POSIX.1 use of `int' for the status word.  */
 
 #  if defined __GNUC__ && !defined __cplusplus
-#   define __WAIT_INT(status)						      \
-  (__extension__ ({ union { __typeof(status) __in; int __i; } __u;	      \
-		    __u.__in = (status); __u.__i; }))
+#   define __WAIT_INT(status) \
+  (__extension__ (((union { __typeof(status) __in; int __i; }) \
+                   { .__in = (status) }).__i))
 #  else
 #   define __WAIT_INT(status)	(*(int *) &(status))
 #  endif