[DEV] Correct build on linux ...
This commit is contained in:
parent
389dae52b6
commit
f0a67e540c
@ -23,7 +23,8 @@
|
|||||||
#if HAVE_LANGINFO_CODESET
|
#if HAVE_LANGINFO_CODESET
|
||||||
# include <langinfo.h>
|
# include <langinfo.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "metadata.h"
|
#include "metadata.h"
|
||||||
#include "content.h"
|
#include "content.h"
|
||||||
|
@ -29,8 +29,7 @@
|
|||||||
|
|
||||||
extern struct ushare_t *ut;
|
extern struct ushare_t *ut;
|
||||||
|
|
||||||
void
|
void print_log (log_level level, const char *format, ...)
|
||||||
print_log (log_level level, const char *format, ...)
|
|
||||||
{
|
{
|
||||||
va_list va;
|
va_list va;
|
||||||
bool is_daemon = ut ? ut->daemon : false;
|
bool is_daemon = ut ? ut->daemon : false;
|
||||||
@ -57,8 +56,6 @@ print_log (log_level level, const char *format, ...)
|
|||||||
va_end (va);
|
va_end (va);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
void start_log (void) {
|
||||||
start_log (void)
|
|
||||||
{
|
|
||||||
openlog (PACKAGE_NAME, LOG_PID, LOG_DAEMON);
|
openlog (PACKAGE_NAME, LOG_PID, LOG_DAEMON);
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ typedef enum {
|
|||||||
|
|
||||||
void print_log (log_level level, const char *format, ...)
|
void print_log (log_level level, const char *format, ...)
|
||||||
__attribute__ ((format (printf, 2, 3)));
|
__attribute__ ((format (printf, 2, 3)));
|
||||||
inline void start_log (void);
|
void start_log (void);
|
||||||
|
|
||||||
/* log_info
|
/* log_info
|
||||||
* Normal print, to replace printf
|
* Normal print, to replace printf
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
|
||||||
|
|
||||||
#if (defined(BSD) || defined(__FreeBSD__) || defined(__APPLE__))
|
#if (defined(BSD) || defined(__FreeBSD__) || defined(__APPLE__))
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
@ -188,7 +189,7 @@ handle_action_request (struct Upnp_Action_Request *request)
|
|||||||
if (strcmp (request->DevUDN + 5, ut->udn))
|
if (strcmp (request->DevUDN + 5, ut->udn))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ip = request->CtrlPtIPAddr.s_addr;
|
ip = ((struct in_addr*)&request->CtrlPtIPAddr)->s_addr;
|
||||||
ip = ntohl (ip);
|
ip = ntohl (ip);
|
||||||
sprintf (val, "%d.%d.%d.%d",
|
sprintf (val, "%d.%d.%d.%d",
|
||||||
(ip >> 24) & 0xFF, (ip >> 16) & 0xFF, (ip >> 8) & 0xFF, ip & 0xFF);
|
(ip >> 24) & 0xFF, (ip >> 16) & 0xFF, (ip >> 8) & 0xFF, ip & 0xFF);
|
||||||
|
@ -127,6 +127,6 @@ struct action_event_t {
|
|||||||
struct service_t *service;
|
struct service_t *service;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline void display_headers (void);
|
void display_headers (void);
|
||||||
|
|
||||||
#endif /* _USHARE_H_ */
|
#endif /* _USHARE_H_ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user