Modules: Fix compilation and remove warnings for BSD
This commit is contained in:
parent
e130557be7
commit
d7538011ec
|
@ -30,7 +30,6 @@ _battery_sysctl_start(void)
|
|||
struct sensordev snsrdev;
|
||||
size_t sdlen = sizeof(struct sensordev);
|
||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
int result;
|
||||
size_t len;
|
||||
#endif
|
||||
|
||||
|
@ -169,8 +168,9 @@ _battery_sysctl_battery_update_poll(void *data EINA_UNUSED)
|
|||
static int
|
||||
_battery_sysctl_battery_update()
|
||||
{
|
||||
double _time, charge;
|
||||
double _time;
|
||||
#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
double charge;
|
||||
struct sensor s;
|
||||
size_t slen = sizeof(struct sensor);
|
||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
|
|
|
@ -687,7 +687,7 @@ _cpufreq_status_check_available(Cpu_Status *s)
|
|||
*q = '\0';
|
||||
freq = atoi(pos);
|
||||
freq *= 1000;
|
||||
s->frequencies = eina_list_append(s->frequencies, (void *)freq);
|
||||
s->frequencies = eina_list_append(s->frequencies, (void *)(long)freq);
|
||||
|
||||
pos = q + 1;
|
||||
pos = strchr(pos, ' ');
|
||||
|
|
|
@ -15,6 +15,11 @@
|
|||
#include <time.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
static E_Module *shot_module = NULL;
|
||||
|
||||
static E_Action *border_act = NULL, *act = NULL;
|
||||
|
@ -1091,7 +1096,7 @@ _x_shot_now(E_Zone *zone, E_Client *ec, const char *params)
|
|||
}
|
||||
fclose(f);
|
||||
}
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
int max;
|
||||
size_t len = sizeof(max);
|
||||
|
||||
|
|
|
@ -354,7 +354,11 @@ _batman_device_update(Instance *inst)
|
|||
static Eina_Bool
|
||||
_screensaver_on(void *data)
|
||||
{
|
||||
#if defined(HAVE_EEZE)
|
||||
Instance *inst = data;
|
||||
#else
|
||||
(void) data;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_EEZE)
|
||||
_batman_udev_stop(inst);
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
EINTERN void _cpuclock_poll_interval_update(Instance *inst);
|
||||
|
||||
typedef struct _Thread_Config Thread_Config;
|
||||
|
@ -102,9 +107,8 @@ void
|
|||
_cpuclock_set_frequency(int frequency)
|
||||
{
|
||||
char buf[4096];
|
||||
struct stat st;
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#if defined(__FreeBSD__)
|
||||
frequency /= 1000;
|
||||
#endif
|
||||
|
||||
|
@ -114,6 +118,7 @@ _cpuclock_set_frequency(int frequency)
|
|||
freq = eina_stringshare_add(buf);
|
||||
ecore_thread_run(_cpuclock_set_thread_frequency, _cpuclock_set_thread_done, NULL, freq);
|
||||
#else
|
||||
struct stat st;
|
||||
char exe[4096];
|
||||
snprintf(exe, 4096, "%s/%s/cpuclock_sysfs",
|
||||
e_module_dir_get(sysinfo_config->module), MODULE_ARCH);
|
||||
|
@ -482,7 +487,7 @@ _cpuclock_status_check_available(Cpu_Status *s)
|
|||
*q = '\0';
|
||||
freq = atoi(pos);
|
||||
freq *= 1000;
|
||||
s->frequencies = eina_list_append(s->frequencies, (void *)freq);
|
||||
s->frequencies = eina_list_append(s->frequencies, (void *)(long)freq);
|
||||
|
||||
pos = q + 1;
|
||||
pos = strchr(pos, ' ');
|
||||
|
|
|
@ -143,7 +143,7 @@ _thermal_check_notify(void *data, Ecore_Thread *th, void *msg)
|
|||
static void
|
||||
_thermal_check_done(void *data, Ecore_Thread *th EINA_UNUSED)
|
||||
{
|
||||
TempThread *tth = data;
|
||||
Tempthread *tth = data;
|
||||
Instance *inst = tth->inst;
|
||||
|
||||
if (inst->cfg->thermal.defer)
|
||||
|
|
|
@ -50,11 +50,12 @@ static Config *temperature_config = NULL;
|
|||
static void
|
||||
_temperature_thread_free(Tempthread *tth)
|
||||
{
|
||||
#if defined(HAVE_EEZE)
|
||||
const char *s;
|
||||
|
||||
#endif
|
||||
eina_stringshare_del(tth->sensor_name);
|
||||
eina_stringshare_del(tth->sensor_path);
|
||||
#ifdef HAVE_EEZE
|
||||
#if defined(HAVE_EEZE)
|
||||
EINA_LIST_FREE(tth->tempdevs, s) eina_stringshare_del(s);
|
||||
#endif
|
||||
e_powersave_sleeper_free(tth->sleeper);
|
||||
|
|
Loading…
Reference in New Issue