[DEV] Correct build on linux ...
This commit is contained in:
parent
389dae52b6
commit
f0a67e540c
@ -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"
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -127,6 +127,6 @@ struct action_event_t {
|
||||
struct service_t *service;
|
||||
};
|
||||
|
||||
inline void display_headers (void);
|
||||
void display_headers (void);
|
||||
|
||||
#endif /* _USHARE_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user