projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5fc7a9
)
shm: Don't use PATH_MAX
author
Pino Toscano
<toscano.pino@tiscali.it>
Mon, 16 May 2011 07:07:57 +0000
(09:07 +0200)
committer
Sebastian Dröge
<sebastian.droege@collabora.co.uk>
Mon, 16 May 2011 07:07:57 +0000
(09:07 +0200)
PATH_MAX is not defined on GNU Hurd and others. Also fix
format string.
sys/shm/shmpipe.c
patch
|
blob
|
history
diff --git
a/sys/shm/shmpipe.c
b/sys/shm/shmpipe.c
index
6465e38
..
38711f9
100644
(file)
--- a/
sys/shm/shmpipe.c
+++ b/
sys/shm/shmpipe.c
@@
-262,7
+262,7
@@
static ShmArea *
sp_open_shm (char *path, int id, mode_t perms, size_t size)
{
ShmArea *area = spalloc_new (ShmArea);
- char tmppath[
PATH_MAX
];
+ char tmppath[
32
];
int flags;
int prot;
int i = 0;
@@
-285,7
+285,7
@@
sp_open_shm (char *path, int id, mode_t perms, size_t size)
area->shm_fd = shm_open (path, flags, perms);
} else {
do {
- snprintf (tmppath,
PATH_MAX, "/shmpipe.5%
d.%5d", getpid (), i++);
+ snprintf (tmppath,
sizeof (tmppath), "/shmpipe.%5
d.%5d", getpid (), i++);
area->shm_fd = shm_open (tmppath, flags, perms);
} while (area->shm_fd < 0 && errno == EEXIST);
}