mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-03 09:56:00 -05:00
Fix errors introduced by r962 on unix side
This commit is contained in:
parent
201ab40e73
commit
e3fc9fa94c
@ -134,7 +134,7 @@ int u_open(u_port_t port) {
|
||||
* into the buffer.
|
||||
* If hostn is NULL or hostnsize <= 0, no hostname is copied.
|
||||
*/
|
||||
int u_accept(int fd, char *hostn, strcut in_addr *hostaddr) {
|
||||
int u_accept(int fd, struct in_addr *hostaddr) {
|
||||
socklen_t len = sizeof(struct sockaddr);
|
||||
struct sockaddr_in netclient;
|
||||
int retval;
|
||||
@ -143,7 +143,7 @@ int u_accept(int fd, char *hostn, strcut in_addr *hostaddr) {
|
||||
accept(fd, (struct sockaddr *)(&netclient), &len)) == -1) &&
|
||||
(errno == EINTR))
|
||||
;
|
||||
if ((retval == -1) || (hostn == NULL) || (hostnsize <= 0))
|
||||
if (retval == -1)
|
||||
return retval;
|
||||
|
||||
*hostaddr = netclient.sin_addr;
|
||||
|
@ -37,6 +37,12 @@
|
||||
/* Prototypes for the three public UICI functions */
|
||||
/*********************************************************************/
|
||||
#define UPORT
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
typedef unsigned short u_port_t;
|
||||
int u_open(u_port_t port);
|
||||
int u_accept(int fd, struct in_addr *hostaddr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user