From 9e65d921dfacc9a20d9a8417313922969c182b82 Mon Sep 17 00:00:00 2001 From: thorpej Date: Thu, 3 Jan 2002 01:55:49 +0000 Subject: [PATCH] Don't assign semun if __lint__. --- lib/libc/sys/__semctl13.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/libc/sys/__semctl13.c b/lib/libc/sys/__semctl13.c index 65cc1183c7da..78ba3619f927 100644 --- a/lib/libc/sys/__semctl13.c +++ b/lib/libc/sys/__semctl13.c @@ -1,4 +1,4 @@ -/* $NetBSD: __semctl13.c,v 1.1 2000/01/31 15:14:19 christos Exp $ */ +/* $NetBSD: __semctl13.c,v 1.2 2002/01/03 01:55:49 thorpej Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: __semctl13.c,v 1.1 2000/01/31 15:14:19 christos Exp $"); +__RCSID("$NetBSD: __semctl13.c,v 1.2 2002/01/03 01:55:49 thorpej Exp $"); #endif /* LIBC_SCCS and not lint */ #include @@ -80,7 +80,11 @@ int __semctl13(va_alist) case GETALL: case SETVAL: case SETALL: - semun = va_arg(ap, union __semun); +#ifdef __lint__ + memcpy(&semun, &semun, sizeof(semun)); +#else + semun = va_arg(ap, union __semun); +#endif } va_end(ap); return ____semctl13(semid, semnum, cmd, &semun);