Hi

I want to add some file in *platform/linux-generic* and
*platform/linux-genic/include*. But Not able to compile simple case. Please
see the scenario .





I have a file say:

* demo.c: *



#include <stdio.h>

#include <unistd.h>



int get_sys_page_size()

{

    int page_size;

    page_size = getpagesize();

    printf("Page Size : %d\n",page_size);

    return 0;

}



*Demo.h : *



#ifndef DEMO_H_

#define DEMO_H_

#ifdef __cplusplus

extern "C" {

#endif

int get_sys_page_size();

#ifdef __cplusplus

}

#endif

#endif



Added demo.c file in :   platform/linux-generic/

Added demo.h file in : platform/linux-generic/include/



Modified *platform/linux-generic/Makefile.am*



${top_srcdir}/platform/linux-generic/include/odp_timer_internal.h \

*++          ${top_srcdir}/platform/linux-generic/include/demo.h \*

          ${top_srcdir}/platform/linux-generic/Makefile.inc



odp_timer.c \

               odp_version.c \

               odp_weak.c \

*++               demo.c*





*./bootstrap*

*./configure*

*Make*





CC       odp_time.lo

  CC       odp_timer.lo

  CC       odp_version.lo

  CC       odp_weak.lo

  CC       demo.lo

demo.c:4:5: error: function declaration isn't a prototype
[-Werror=strict-prototypes]

 int get_sys_page_size()

     ^

demo.c: In function 'get_sys_page_size':

demo.c:4:5: error: old-style function definition
[-Werror=old-style-definition]

demo.c:7:2: error: implicit declaration of function 'getpagesize'
[-Werror=implicit-function-declaration]

  page_size = getpagesize();

  ^

demo.c:7:2: error: nested extern declaration of 'getpagesize'
[-Werror=nested-externs]

cc1: all warnings being treated as errors

make[2]: *** [demo.lo] Error 1

make[2]: Leaving directory `. /ODPV1.0-C1/platform/linux-generic'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `. /ODP-MJ/ODPV1.0-C1/platform'

make: *** [all-recursive] Error 1





If someone help me in this regards, it will be very helpful for me. The
same use cases, I am able to perform over ODPV0.7.



Regards

Ayushman
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to