* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/ipc.h>
+#ifdef HAVE_SYS_IPC_H
+# include <sys/ipc.h>
+#elif defined HAVE_LINUX_IPC_H
+# include <linux/ipc.h>
+/* While glibc uses __key, the kernel uses key. */
+# define __key key
+#endif
#if !defined IPC_64
# define IPC_64 0x100