Use time(), localtime_r(), and asctime() to confirm that the
declarations required for these (newlib) libc functions are made
available in CONFIG_POSIX context.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The sample does not provide a way to verify its operation
and causes fails on nrf platforms. Added regex checks in sample.yaml
so the sample can be verified.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Also, add prj.conf options to make the sample builds on more
platforms. Finally, update the sample source to print explicit
"Finished" message, to let user know that the processing is done.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This provides a better error message when building with CMake and
forgetting ZEPHYR_BASE or not registering Zephyr in the CMake package
registry. See parent commit for more details (split from parent for
better readability).
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Standard "Requirements" section copied from other networking samples,
making clear the network connection requirements and linking to
instructions for QEMU networking.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
To make sure this sample is built in CI.
Also includes fixing prototype of main() to make it build without
warnings (which would be errors in CI).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Roughly based on eventfd example code from Linux manpages. Similarly
to other POSIX-compatible sample, Makefile.posix is provided to build
the code on a POSIX system (in this case, as eventfd() is
Linux-specific, this has to be a Linux system).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Using find_package to locate Zephyr.
Old behavior was to use $ENV{ZEPHYR_BASE} for inclusion of boiler plate
code.
Whenever an automatic run of CMake happend by the build system / IDE
then it was required that ZEPHYR_BASE was defined.
Using ZEPHYR_BASE only to locate the Zephyr package allows CMake to
cache the base variable and thus allowing subsequent invocation even
if ZEPHYR_BASE is not set in the environment.
It also removes the risk of strange build results if a user switchs
between different Zephyr based project folders and forgetting to reset
ZEPHYR_BASE before running ninja / make.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The application main() in Zephyr is defined as having a prototype:
void main(void), as expected by the kernel init (bg_thread_main).
So, correct the different samples and tests that were defined
otherwise.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Achieved using CONFIG_NET_CONFIG_CLOCK_SNTP_INIT option, i.e. querying
time over network using SNTP.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>