guowenxue
2021-11-03 1a128c78e4119cae8d35b661149a12d0fd083b1a
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;