sys: fix symbol redeclaration
authorJo-Philipp Wich <jo@mein.io>
Wed, 4 Sep 2019 13:50:34 +0000 (15:50 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 4 Sep 2019 13:51:39 +0000 (15:51 +0200)
Fixes: 27c24c7 ("rpcd: sys: actually move timespec declaration")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
sys.c

diff --git a/sys.c b/sys.c
index 60ff5d6c1e8405be36a344e3d9453c36e52abac2..fecf66cb2e722ad2b1a227c1624488866a2cc3bd 100644 (file)
--- a/sys.c
+++ b/sys.c
@@ -88,7 +88,7 @@ rpc_cgi_password_set(struct ubus_context *ctx, struct ubus_object *obj,
        ssize_t n;
        int ret;
        const char *const passwd = "/bin/passwd";
-       const struct timespec req = {0, 100 * 1000 * 1000};
+       const struct timespec ts = {0, 100 * 1000 * 1000};
 
        blobmsg_parse(rpc_password_policy, __RPC_P_MAX, tb,
                      blob_data(msg), blob_len(msg));
@@ -146,7 +146,7 @@ rpc_cgi_password_set(struct ubus_context *ctx, struct ubus_object *obj,
                if (n < 0)
                        return rpc_errno_status();
 
-               nanosleep(&req, NULL);
+               nanosleep(&ts, NULL);
 
                n = write(fds[1], blobmsg_data(tb[RPC_P_PASSWORD]),
                              blobmsg_data_len(tb[RPC_P_PASSWORD]) - 1);