guowenxue
2023-07-10 c13c9806f957ebc675462737f4b328d3ab89e028
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;