diff options
author | Pino Toscano <toscano.pino@tiscali.it> | 2011-05-16 09:07:57 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-05-16 09:07:57 +0200 |
commit | 01b7b10d0b3002a5ef55891467e9f174d4fea9e3 (patch) | |
tree | f9b6fe6690596206ff15978da3fa861a6dd08e08 /sys/shm | |
parent | e5fc7a9f13a032c714fc3ad105ddf352accb82c3 (diff) | |
download | gstreamer-plugins-bad-01b7b10d0b3002a5ef55891467e9f174d4fea9e3.tar.gz |
shm: Don't use PATH_MAX
PATH_MAX is not defined on GNU Hurd and others. Also fix
format string.
Diffstat (limited to 'sys/shm')
-rw-r--r-- | sys/shm/shmpipe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/shm/shmpipe.c b/sys/shm/shmpipe.c index 6465e381c..38711f9f3 100644 --- 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.%5d.%5d", getpid (), i++); area->shm_fd = shm_open (tmppath, flags, perms); } while (area->shm_fd < 0 && errno == EEXIST); } |