diff --git a/include/libwebsockets/lws-timeout-timer.h b/include/libwebsockets/lws-timeout-timer.h index 5c3783315..49e47087e 100644 --- a/include/libwebsockets/lws-timeout-timer.h +++ b/include/libwebsockets/lws-timeout-timer.h @@ -196,11 +196,11 @@ lws_timed_callback_vh_protocol_us(struct lws_vhost *vh, typedef void (*sul_cb_t)(lws_sorted_usec_list_t *sul); -typedef struct lws_sorted_usec_list { +struct lws_sorted_usec_list { struct lws_dll2 list; /* simplify the code by keeping this at start */ sul_cb_t cb; lws_usec_t us; -} lws_sorted_usec_list_t; +}; /* diff --git a/lib/core-net/private.h b/lib/core-net/private.h index fd0a62d37..89454e204 100644 --- a/lib/core-net/private.h +++ b/lib/core-net/private.h @@ -279,7 +279,7 @@ typedef struct lws_dsh_obj { size_t asize; } lws_dsh_obj_t; -typedef struct lws_dsh { +struct lws_dsh { lws_dll2_t list; uint8_t *buf; lws_dsh_obj_head_t *oha; /* array of object heads/kind */ @@ -294,7 +294,7 @@ typedef struct lws_dsh { * - the buffer itself * - the object heads array */ -} lws_dsh_t; +}; /* * so we can have n connections being serviced simultaneously, diff --git a/lib/core-net/sequencer.c b/lib/core-net/sequencer.c index fbfd75213..3ddf00990 100644 --- a/lib/core-net/sequencer.c +++ b/lib/core-net/sequencer.c @@ -35,7 +35,7 @@ typedef struct lws_seq_event { /* * per sequencer */ -typedef struct lws_sequencer { +struct lws_sequencer { struct lws_dll2 seq_list; lws_sorted_usec_list_t sul_timeout; @@ -51,7 +51,7 @@ typedef struct lws_sequencer { lws_usec_t timeout; /* 0 or time we timeout */ char going_down; -} lws_seq_t; +}; #define QUEUE_SANITY_LIMIT 10 diff --git a/lib/core/private.h b/lib/core/private.h index 196b43a08..4e0392910 100644 --- a/lib/core/private.h +++ b/lib/core/private.h @@ -469,7 +469,7 @@ lws_b64_selftest(void); #ifndef LWS_NO_DAEMONIZE - LWS_EXTERN int get_daemonize_pid(); + LWS_EXTERN pid_t get_daemonize_pid(); #else #define get_daemonize_pid() (0) #endif diff --git a/lib/misc/daemonize.c b/lib/misc/daemonize.c index 52fd6ea05..7378f192a 100644 --- a/lib/misc/daemonize.c +++ b/lib/misc/daemonize.c @@ -62,7 +62,7 @@ child_handler(int signum) lock_path, errno, strerror(errno)); exit(0); } - len = sprintf(sz, "%u", pid_daemon); + len = sprintf(sz, "%u", (unsigned int)pid_daemon); sent = write(fd, sz, len); if (sent != len) fprintf(stderr, diff --git a/lib/plat/unix/private.h b/lib/plat/unix/private.h index 1702d4b05..73fdfbb60 100644 --- a/lib/plat/unix/private.h +++ b/lib/plat/unix/private.h @@ -168,6 +168,6 @@ delete_from_fd(const struct lws_context *context, int fd); * Solaris 11.X only supports POSIX 2001, MSG_NOSIGNAL appears in * POSIX 2008. */ -#if defined(__sun) && !defined(__smartos__) +#if defined(__sun) && !defined(MSG_NOSIGNAL) #define MSG_NOSIGNAL 0 #endif diff --git a/lib/roles/http/private.h b/lib/roles/http/private.h index 5759c85b5..1cc996013 100644 --- a/lib/roles/http/private.h +++ b/lib/roles/http/private.h @@ -302,7 +302,5 @@ int lws_http_proxy_start(struct lws *wsi, const struct lws_http_mount *hit, char *uri_ptr, char ws); -typedef struct lws_sorted_usec_list lws_sorted_usec_list_t; - void lws_sul_http_ah_lifecheck(lws_sorted_usec_list_t *sul); diff --git a/test-apps/test-sshd.c b/test-apps/test-sshd.c index 65bff38d1..69d831e94 100644 --- a/test-apps/test-sshd.c +++ b/test-apps/test-sshd.c @@ -202,7 +202,7 @@ ssh_ops_rx(void *_priv, struct lws *wsi, const uint8_t *buf, uint32_t len) fd = lws_get_socket_fd(wsi_stdin); if (*buf != 0x0d) { - if (write(fd, buf, len) != len) + if (write(fd, buf, len) != (int)len) return -1; if (priv->pty_in_echo) { if (!lws_ring_insert(priv->ring_stdout, buf, 1))