ecore_audio: include libgen.h on FreeBSD to define basename(3)
authorConrad Meyer <cse.cem@gmail.com>
Fri, 10 Apr 2015 09:15:57 +0000 (11:15 +0200)
committerCedric BAIL <cedric@osg.samsung.com>
Fri, 10 Apr 2015 10:05:05 +0000 (12:05 +0200)
Summary:
Fixes warning:

    lib/ecore_audio/ecore_audio_obj_out_pulse.c:275:60: warning: implicit declaration of function 'basename' is invalid in C99
      [-Wimplicit-function-declaration]
       class_vars.context = pa_context_new(class_vars.api, basename(argv[0]));
                                                           ^
    lib/ecore_audio/ecore_audio_obj_out_pulse.c:275:60: warning: incompatible integer to pointer conversion passing 'int' to parameter of
      type 'const char *' [-Wint-conversion]
       class_vars.context = pa_context_new(class_vars.api, basename(argv[0]));
                                                           ^~~~~~~~~~~~~~~~~
    /usr/local/include/pulse/context.h:174:67: note: passing argument to parameter 'name' here
    pa_context *pa_context_new(pa_mainloop_api *mainloop, const char *name);
                                                                  ^

Test Plan: It now compiles without warning.

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D2313

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/ecore_audio/ecore_audio_obj_out_pulse.c

index 276e835..a7308ab 100644 (file)
@@ -6,7 +6,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#if defined (__MacOSX__) || (defined (__MACH__) && defined (__APPLE__))
+#if defined (__MacOSX__) || (defined (__MACH__) && defined (__APPLE__)) || defined (__FreeBSD__)
 # include <libgen.h>
 #endif