> Hi all,
>
> In trying to cross-compile uWSGI for an embedded ARM board on an
> Ubuntu 11.10 host, I ran into this error:
>
> | arm-angstrom-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s
> -mthumb-interwork -mno-thumb -c -O2 -Wall -Werror -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -fexpensive-optimizations -frename-registers
> -fomit-frame-pointer -O2 -ggdb2 -fno-strict-aliasing -Wextra
> -Wno-unused-parameter -Wno-missing-field-initializers
> -DUWSGI_BUILD_DATE="\"25 October 2011 15:47:04\""
> -DUWSGI_HAS_IFADDRcc1: warnings being treated as errors
> | event.c: In function 'timerfd_create':
> | event.c:695: error: control reaches end of non-void function
> | event.c: In function 'timerfd_settime':
> | event.c:705: error: control reaches end of non-void function
> | S -DUWSGI_LOCK_USE_MUTEX -DUWSGI_EVENT_USE_EPOLL
> -DUWSGI_EVENT_TIMER_USE_TIMERFD -DUWSGI_EVENT_TIMER_USE_TIMERFD_NOINC
> -DUWSGI_EVENT_FILEMONITOR_USE_INOTIFY -DUWSGI_EMBEDDED -DUWSGI_UDP
> -DUWSGI_VERSION="\"0.9.9.2\"" -DUWSGI_VERSION_BASE="0"
> -DUWSGI_VERSION_MAJOR="9" -DUWSGI_VERSION_MINOR="9"
> -DUWSGI_VERSION_REVISION="2" -DUWSGI_VERSION_CUSTOM="\"\""
> -DUWSGI_ASYNC -DUWSGI_MULTICAST -DUWSGI_MINTERPRETERS -DUWSGI_INI
> -DUWSGI_YAML -DUWSGI_SNMP -DUWSGI_THREADING -DUWSGI_SENDFILE
> -I/home/brandon/oe-beta-build/tmp/sysroots/armv5te-angstrom-linux-gnueabi/usr/include/libxml2
> -DUWSGI_XML -DUWSGI_XML_LIBXML2 -DUWSGI_PLUGIN_DIR=\".\"
> -DUWSGI_SPOOLER
> -DUWSGI_DECLARE_EMBEDDED_PLUGINS="UDEP(python);UDEP(ping);UDEP(cache);UDEP(nagios);UDEP(rpc);UDEP(fastrouter);UDEP(http);UDEP(ugreen);"
> -DUWSGI_LOAD_EMBEDDED_PLUGINS="ULEP(python);ULEP(ping);ULEP(cache);ULEP(nagios);ULEP(rpc);ULEP(fastrouter);ULEP(http);ULEP(ugreen);"
> -o event.o event.c
>
> I think that the relevant lines of event.c are the following:
>
> #ifndef TFD_CLOEXEC
>
> // timerfd support
>
> enum
>  {
>    TFD_CLOEXEC = 02000000,
> #define TFD_CLOEXEC TFD_CLOEXEC
>    TFD_NONBLOCK = 04000
> #define TFD_NONBLOCK TFD_NONBLOCK
>  };
>
> /* Bits to be set in the FLAGS parameter of `timerfd_settime'.  */
> enum
>  {
>    TFD_TIMER_ABSTIME = 1 << 0
> #define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME
>  };
>
> static int timerfd_create (clockid_t __clock_id, int __flags) {
> #ifdef __amd64__
>        return syscall(283, __clock_id, __flags);
> #elif defined(__i386__)
>        return syscall(322, __clock_id, __flags);
> #endif

adding a return -1 here shoudl be enough. If you use timer, substitute
them with rbtimer (they do not require kernel help)


-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to