guowenxue
2021-11-03 fcfb88f7bb207b825c3f59a8a0859f1e9146420c
iotd/lylib/util_time.h
@@ -25,6 +25,15 @@
#include <sys/stat.h>
#include <sys/time.h>
#ifndef offsetof
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#endif
#define container_of(ptr, type, member) ({      \
        const typeof( ((type *)0)->member ) *__mptr = (ptr);    \
        (type *)( (char *)__mptr - offsetof(type,member) );})
typedef struct date_time_s
{
    int year;