Hi,
here are patches to fix compilation on OpenBSD and FreeBSD
(and NetBSD ?).

- The 'tainted' variable is unused, so removed.
- Switch to execv(), as FreeBSD and OpenBSD doesn't have
  PTRACE_GETSIGINFO
- Just moved to size_t to avoid warning on FreeBSD

Thanks
--- src/bin/e_start_main.c	2012-11-09 16:23:40.487464346 +0100
+++ src/bin/e_start_main.c	2012-11-09 16:23:21.054770189 +0100
@@ -18,8 +18,6 @@
 
 #include <Eina.h>
 
-static Eina_Bool tainted = EINA_FALSE;
-
 static void env_set(const char *var, const char *val);
 EAPI int    prefix_determine(char *argv0);
 
@@ -233,7 +231,11 @@
    char valgrind_path[PATH_MAX] = "";
    const char *valgrind_log = NULL;
    Eina_Bool really_know = EINA_FALSE;
+
+#ifdef __linux__
    Eina_Bool restart = EINA_TRUE;
+#endif
+
    struct sigaction action;
    
    action.sa_sigaction = _sigusr1;
@@ -389,17 +391,19 @@
    args[i++] = buf;
    copy_args(args + i, argv + 1, argc - 1);
    args[i + argc - 1] = NULL;
-   /* execv(args[0], args); */
 
-   /* not run at the moment !! */
+#ifndef __linux__
+   execv(args[0], args);
+#endif
 
+   /* not run at the moment !! */
 
+#ifdef __linux__
    /* Now looping until */
    while (restart)
      {
         pid_t child;
 
-        tainted = EINA_FALSE;
         child = fork();
 
         if (child < 0) /* failed attempt */
@@ -533,6 +537,7 @@
           }
           
      }
+#endif /* __linux__ */
 
    return -1;
 }
--- src/modules/cpufreq/freqset.c	2012-11-09 15:29:25.510344614 +0100
+++ src/modules/cpufreq/freqset.c	2012-11-09 15:29:18.349457011 +0100
@@ -56,7 +56,7 @@
    if (!strcmp(argv[1], "frequency"))
      {
         int new_frequency = atoi(argv[2]);
-        int len = 4;
+        size_t len = sizeof(new_frequency);
         if (sysctlbyname("dev.cpu.0.freq", NULL, 0, &new_frequency, &len) == -1)
           {
              fprintf(stderr, "Unable to open frequency interface for writing.\n");
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to