From ffd9710559415baec7161f80ea3041a846dbbfe6 Mon Sep 17 00:00:00 2001 From: Yang Kun <91833768+ikspress@users.noreply.github.com> Date: Tue, 20 Aug 2024 20:38:15 +0800 Subject: [PATCH] ipcrm: simplify code --- sys-utils/ipcrm.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/sys-utils/ipcrm.c b/sys-utils/ipcrm.c index d417c5593..26255c494 100644 --- a/sys-utils/ipcrm.c +++ b/sys-utils/ipcrm.c @@ -19,25 +19,13 @@ #include #include #include -#include -#include -#include -#include #include #include "c.h" #include "nls.h" #include "strutils.h" #include "closestream.h" -#ifndef HAVE_UNION_SEMUN -/* according to X/OPEN we have to define it ourselves */ -union semun { - int val; - struct semid_ds *buf; - unsigned short int *array; - struct seminfo *__buf; -}; -#endif +#include "ipcutils.h" typedef enum type_id { SHM, @@ -281,13 +269,6 @@ static int remove_all(type_id type) ret |= remove_id(SEM, 0, rm_me); } } -/* kFreeBSD hackery -- ah 20140723 */ -#ifndef MSG_STAT -#define MSG_STAT 11 -#endif -#ifndef MSG_INFO -#define MSG_INFO 12 -#endif if (type == MSG || type == ALL) { maxid = msgctl(0, MSG_INFO, (struct msqid_ds *)(void *)&msginfo); -- 2.47.3