samples: posix: gettimeofday: Add sample.yaml

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>
This commit is contained in:
Paul Sokolovsky 2020-04-28 13:09:42 +03:00 committed by Jukka Rissanen
parent 4221642b28
commit 76861d008b
2 changed files with 13 additions and 1 deletions

View file

@ -0,0 +1,12 @@
sample:
description: POSIX API gettimeofday() example (with SNTP)
name: gettimeofday
common:
filter: TOOLCHAIN_HAS_NEWLIB == 1
harness: net
min_ram: 32
min_flash: 96
tags: posix net
tests:
sample.posix.gettimeofday:
harness: net

View file

@ -10,7 +10,7 @@
#include <sys/time.h>
#include <unistd.h>
void main(void)
int main(void)
{
struct timeval tv;