A couple of fixes

- using LDFLAGS doesn't pull the required dependencies, move
  to using LOCAL_SHARED_LIBRARIES
- eliminate 'implicit declaration' warnings

Change-Id: I57f6feca6bfcf8b2e9d439462a33c9757cdde07d
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
diff --git a/jni/Android.mk b/jni/Android.mk
index 0b8480e..37382e4 100644
--- a/jni/Android.mk
+++ b/jni/Android.mk
@@ -8,7 +8,7 @@
 
 LOCAL_SDK_VERSION := 9
 
-LOCAL_LDFLAGS :=  -llog -lEGL
+LOCAL_SHARED_LIBRARIES := liblog libEGL
 
 LOCAL_MODULE_TAGS := optional
 
@@ -22,7 +22,7 @@
 include $(CLEAR_VARS)
 
 LOCAL_CPP_EXTENSION := .cc
-LOCAL_LDFLAGS	:= -llog -ljnigraphics
+LOCAL_SHARED_LIBRARIES := liblog libjnigraphics
 LOCAL_SDK_VERSION := 9
 LOCAL_MODULE    := libjni_filtershow_filters
 LOCAL_SRC_FILES := filters/gradient.c \
diff --git a/jni/filters/hsv.c b/jni/filters/hsv.c
index aabd053..966b05a 100644
--- a/jni/filters/hsv.c
+++ b/jni/filters/hsv.c
@@ -15,6 +15,7 @@
  */
 
 #include <math.h>
+#include <stdlib.h> /* For abs */
 #include "filters.h"
 
 double fastevalPoly(double *poly,int n, double x){
diff --git a/jni_jpegstream/Android.mk b/jni_jpegstream/Android.mk
index 2a09fb5..96cc7ec 100644
--- a/jni_jpegstream/Android.mk
+++ b/jni_jpegstream/Android.mk
@@ -12,9 +12,8 @@
                     $(LOCAL_PATH)/src \
                     external/jpeg
 
-LOCAL_SHARED_LIBRARIES := libjpeg
+LOCAL_SHARED_LIBRARIES := libjpeg liblog
 
-LOCAL_LDFLAGS        := -llog
 LOCAL_SDK_VERSION   := 9
 LOCAL_ARM_MODE := arm