mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-21 16:19:23 +08:00
[mpp_common]: Add container_of macro
Include <stddef.h> and add container_of macro. Change-Id: Ie439b7683e026be9336e618c605b3b934e4fde38 Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
@@ -148,11 +148,14 @@
|
||||
#define fseeko fseeko64
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#define mkdir(x) mkdir(x, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)
|
||||
#endif
|
||||
|
||||
#define container_of(ptr, type, member) \
|
||||
((type *)((char *)(ptr) - offsetof(type, member)))
|
||||
|
||||
#define __RETURN __Return
|
||||
#define __FAILED __failed
|
||||
|
Reference in New Issue
Block a user