[DEV] Correct build on linux ...

This commit is contained in:
Edouard DUPIN 2015-11-10 14:05:10 +01:00
parent 389dae52b6
commit f0a67e540c
5 changed files with 8 additions and 9 deletions

View File

@ -23,7 +23,8 @@
#if HAVE_LANGINFO_CODESET
# include <langinfo.h>
#endif
#include <string.h>
#include <stdio.h>
#include "config.h"
#include "metadata.h"
#include "content.h"

View File

@ -29,8 +29,7 @@
extern struct ushare_t *ut;
void
print_log (log_level level, const char *format, ...)
void print_log (log_level level, const char *format, ...)
{
va_list va;
bool is_daemon = ut ? ut->daemon : false;
@ -57,8 +56,6 @@ print_log (log_level level, const char *format, ...)
va_end (va);
}
inline void
start_log (void)
{
void start_log (void) {
openlog (PACKAGE_NAME, LOG_PID, LOG_DAEMON);
}

View File

@ -29,7 +29,7 @@ typedef enum {
void print_log (log_level level, const char *format, ...)
__attribute__ ((format (printf, 2, 3)));
inline void start_log (void);
void start_log (void);
/* log_info
* Normal print, to replace printf

View File

@ -28,6 +28,7 @@
#include <errno.h>
#include <getopt.h>
#if (defined(BSD) || defined(__FreeBSD__) || defined(__APPLE__))
#include <sys/socket.h>
#include <sys/sysctl.h>
@ -188,7 +189,7 @@ handle_action_request (struct Upnp_Action_Request *request)
if (strcmp (request->DevUDN + 5, ut->udn))
return;
ip = request->CtrlPtIPAddr.s_addr;
ip = ((struct in_addr*)&request->CtrlPtIPAddr)->s_addr;
ip = ntohl (ip);
sprintf (val, "%d.%d.%d.%d",
(ip >> 24) & 0xFF, (ip >> 16) & 0xFF, (ip >> 8) & 0xFF, ip & 0xFF);

View File

@ -127,6 +127,6 @@ struct action_event_t {
struct service_t *service;
};
inline void display_headers (void);
void display_headers (void);
#endif /* _USHARE_H_ */