summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-09-13 21:09:35 -0400
committerRich Felker <dalias@aerifal.cx>2011-09-13 21:09:35 -0400
commit13cd969552409e05c941829f2aabb15e2f4d9a1f (patch)
tree5e104dd27e5f794d1f083d9a8fea516c9009eb39 /src
parent5e9deea0039204f3b29edb1ffe0e30325d456f84 (diff)
downloadmusl-13cd969552409e05c941829f2aabb15e2f4d9a1f.tar.gz
fix various errors in function signatures/prototypes found by nsz
Diffstat (limited to 'src')
-rw-r--r--src/aio/aio_suspend.c2
-rw-r--r--src/process/posix_spawn.c8
-rw-r--r--src/process/posix_spawnp.c5
-rw-r--r--src/unistd/readlink.c2
-rw-r--r--src/unistd/readlinkat.c2
5 files changed, 11 insertions, 8 deletions
diff --git a/src/aio/aio_suspend.c b/src/aio/aio_suspend.c
index cb2539e9..39a1d3a2 100644
--- a/src/aio/aio_suspend.c
+++ b/src/aio/aio_suspend.c
@@ -16,7 +16,7 @@ void __aio_wake(void)
__wake(&seq, -1, 1);
}
-int aio_suspend(struct aiocb *const cbs[], int cnt, const struct timespec *ts)
+int aio_suspend(const struct aiocb *const cbs[], int cnt, const struct timespec *ts)
{
int i, last, first=1, ret=0;
struct timespec at;
diff --git a/src/process/posix_spawn.c b/src/process/posix_spawn.c
index b1a9fbde..9f2d7423 100644
--- a/src/process/posix_spawn.c
+++ b/src/process/posix_spawn.c
@@ -11,7 +11,8 @@ extern char **environ;
int __posix_spawnx(pid_t *res, const char *path,
int (*exec)(const char *, char *const *),
const posix_spawn_file_actions_t *fa,
- const posix_spawnattr_t *attr, char **argv, char **envp)
+ const posix_spawnattr_t *attr,
+ char *const argv[], char *const envp[])
{
pid_t pid;
sigset_t oldmask;
@@ -81,7 +82,7 @@ int __posix_spawnx(pid_t *res, const char *path,
sigprocmask(SIG_SETMASK, (attr->__flags & POSIX_SPAWN_SETSIGMASK)
? &attr->__mask : &oldmask, 0);
- if (envp) environ = envp;
+ if (envp) environ = (char **)envp;
exec(path, argv);
_exit(127);
@@ -90,7 +91,8 @@ int __posix_spawnx(pid_t *res, const char *path,
int posix_spawn(pid_t *res, const char *path,
const posix_spawn_file_actions_t *fa,
- const posix_spawnattr_t *attr, char **argv, char **envp)
+ const posix_spawnattr_t *attr,
+ char *const argv[], char *const envp[])
{
return __posix_spawnx(res, path, execv, fa, attr, argv, envp);
}
diff --git a/src/process/posix_spawnp.c b/src/process/posix_spawnp.c
index 7434bb69..04d768d0 100644
--- a/src/process/posix_spawnp.c
+++ b/src/process/posix_spawnp.c
@@ -4,11 +4,12 @@
int __posix_spawnx(pid_t *, const char *,
int (*)(const char *, char *const *),
const posix_spawn_file_actions_t *,
- const posix_spawnattr_t *, char **, char **);
+ const posix_spawnattr_t *, char *const [], char *const []);
int posix_spawnp(pid_t *res, const char *file,
const posix_spawn_file_actions_t *fa,
- const posix_spawnattr_t *attr, char **argv, char **envp)
+ const posix_spawnattr_t *attr,
+ char *const argv[], char *const envp[])
{
return __posix_spawnx(res, file, execvp, fa, attr, argv, envp);
}
diff --git a/src/unistd/readlink.c b/src/unistd/readlink.c
index 11f45c01..0c6d3861 100644
--- a/src/unistd/readlink.c
+++ b/src/unistd/readlink.c
@@ -1,7 +1,7 @@
#include <unistd.h>
#include "syscall.h"
-int readlink(const char *path, char *buf, size_t bufsize)
+ssize_t readlink(const char *path, char *buf, size_t bufsize)
{
return syscall(SYS_readlink, path, buf, bufsize);
}
diff --git a/src/unistd/readlinkat.c b/src/unistd/readlinkat.c
index 9565b89a..e9498650 100644
--- a/src/unistd/readlinkat.c
+++ b/src/unistd/readlinkat.c
@@ -1,7 +1,7 @@
#include <unistd.h>
#include "syscall.h"
-int readlinkat(int fd, const char *path, char *buf, size_t bufsize)
+ssize_t readlinkat(int fd, const char *path, char *buf, size_t bufsize)
{
return syscall(SYS_readlinkat, fd, path, buf, bufsize);
}