在sys/inotify.h(inotify.h)中,定义了以下结构:
struct inotify_event
{
int wd; /* Watch descriptor. */
uint32_t mask; /* Watch mask. */
uint32_t cookie; /* Cookie to synchronize two events. */
uint32_t len; /* Length (including NULs) of name. */
char name __flexarr; /* Name. */
};
Run Code Online (Sandbox Code Playgroud)
我__flexarr在代码中找不到任何定义.我在哪里搜索它?
在一个不相关的项目中,我发现#define __flexarr [1]我认为它做了类似的事情,但这个定义对我来说没有多大意义(对C非常不熟悉).
我唯一知道的是你可以在其中存储不同长度的字符串,但我完全不了解它是如何/为何起作用的.
有人在乎解释吗?谢谢.
c ×1