title: What is __flexarr and how/why do c programmers use it?
body: <p>In <code>sys/inotify.h</code> (<a href="https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/+/android-4.1.1_r6/sysroot/usr/include/sys/inotify.h" rel="noreferrer">inotify.h</a>), following struct is defined:</p>
  
  <pre><code>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.  */
  };
  </code></pre>
  
  <p>I can't find any definitions for <code>__flexarr</code> in the code. Where would I search for it?</p>
  
  <p>In an unrelated project I found <code>#define __flexarr [1]</code> which I assume does something similar, but this definition does not make much sense to me (being quite unfamiliar with C).</p>
  
  <p>The only thing I know is that you can store strings of various length in it, but I completely lack the understanding of how/why this works.</p>
  
  <p>Does anybody care to explain? Thanks.</p>