The Samba-Bugzilla – Attachment 4708 Details for
Bug 6736
smbtorture fails to link on QNX
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Port shm_setup to QNX
0001-Port-shm_setup-to-QNX.patch (text/plain), 1.26 KB, created by
Matt Kraai (mail address dead)
on 2009-09-16 16:28:20 UTC
(
hide
)
Description:
Port shm_setup to QNX
Filename:
MIME Type:
Creator:
Matt Kraai (mail address dead)
Created:
2009-09-16 16:28:20 UTC
Size:
1.26 KB
patch
obsolete
>From e98a19404627c21c8bd889309268a427cd947ab4 Mon Sep 17 00:00:00 2001 >From: Matt Kraai <mkraai@beckman.com> >Date: Wed, 16 Sep 2009 14:23:16 -0700 >Subject: [PATCH] Port shm_setup to QNX > >--- > source3/torture/torture.c | 18 ++++++++++++++++++ > 1 files changed, 18 insertions(+), 0 deletions(-) > >diff --git a/source3/torture/torture.c b/source3/torture/torture.c >index ed592f1..7ad8f95 100644 >--- a/source3/torture/torture.c >+++ b/source3/torture/torture.c >@@ -76,6 +76,7 @@ void *shm_setup(int size) > int shmid; > void *ret; > >+#ifndef __QNXNTO__ > shmid = shmget(IPC_PRIVATE, size, S_IRUSR | S_IWUSR); > if (shmid == -1) { > printf("can't get shared memory\n"); >@@ -94,6 +95,23 @@ void *shm_setup(int size) > See Stevens "advanced programming in unix env" for details > */ > shmctl(shmid, IPC_RMID, 0); >+#else >+ shmid = shm_open("private", O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); >+ if (shmid == -1) { >+ printf("can't get shared memory\n"); >+ exit(1); >+ } >+ shm_unlink("private"); >+ if (ftruncate(shmid, size) == -1) { >+ printf("can't set shared memory size\n"); >+ exit(1); >+ } >+ ret = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, shmid, 0); >+ if (ret == MAP_FAILED) { >+ printf("can't map shared memory\n"); >+ exit(1); >+ } >+#endif > > return ret; > } >-- >1.6.4.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 6736
:
4708
|
4710