/
patch-aa
34 lines (25 loc) · 1.1 KB
/
patch-aa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$NetBSD: patch-aa,v 1.2 2011/05/22 19:11:42 dholland Exp $
- fix msgget?
- use intptr_t
--- dpteng/eng_unix.c.orig 2002-08-13 15:02:23.000000000 +0000
+++ dpteng/eng_unix.c
@@ -319,7 +319,7 @@ main(int argc, char *argv[])
if (ExitEngine) {
int i;
struct msqid_ds CtlBuf;
- MsqID = msgget(DPT_EngineKey, MSG_ALLRD | MSG_ALLWR);
+ MsqID = msgget(DPT_EngineKey, MSG_URD | MSG_UWR);
if(MsqID != -1) {
msgctl(MsqID, IPC_STAT, &CtlBuf);
// Stop engine only, if no dptmgr still running
@@ -359,7 +359,7 @@ main(int argc, char *argv[])
/* Try To Create The Unique Message Que Of This ID */
- MsqID = msgget(DPT_EngineKey,IPC_CREAT | IPC_EXCL | MSG_ALLRD | MSG_ALLWR);
+ MsqID = msgget(DPT_EngineKey,IPC_CREAT | IPC_EXCL | MSG_URD | MSG_UWR);
/* If We Could Not Allocate The Message Que, Print A Message And Exit */
@@ -469,7 +469,7 @@ main(int argc, char *argv[])
/* Make Sure That We Could Attach */
- if((int)toEng_P != -1)
+ if((intptr_t)toEng_P != -1)
{
fromEng_P = toEng_P + HdrBuff.FromEngBuffOffset;