title: How to compile python2 v2.7.16 under Mingw-w64 (I have got compile errors)
body: <p>I have tried to compile python2 v2.7.16 using the MINGW-packages git repo:</p>
  
  <p><code>git clone https://github.com/msys2/MINGW-packages.git</code></p>
  
  <p><code>cd MINGW-packages/mingw-w64-python2</code></p>
  
  <p><code>MINGW_INSTALLS='mingw32' makepkg-mingw -dLf --nocheck --skippgpcheck</code></p>
  
  <p>I always get the following errors:</p>
  
  <pre><code>../Python-2.7.16/Python/random.c:247:16: warning: implicit declaration of function 'fcntl'; did you mean 'rintl'? [-Wimplicit-function-declaration]
           attr = fcntl(fd, F_GETFD);
                  ^~~~~
                  rintl
  ../Python-2.7.16/Python/random.c:247:26: error: 'F_GETFD' undeclared (first use in this function)
           attr = fcntl(fd, F_GETFD);
                            ^~~~~~~
  ../Python-2.7.16/Python/random.c:247:26: note: each undeclared identifier is reported only once for each function it appears in
  ../Python-2.7.16/Python/random.c:249:21: error: 'FD_CLOEXEC' undeclared (first use in this function); did you mean 'S_IEXEC'?
               attr |= FD_CLOEXEC;
                       ^~~~~~~~~~
                       S_IEXEC
  ../Python-2.7.16/Python/random.c:250:29: error: 'F_SETFD' undeclared (first use in this function)
               (void)fcntl(fd, F_SETFD, attr);
                               ^~~~~~~
  make: *** [Makefile:1376: Python/random.o] Error 1
  ==&gt; ERROR: A failure occurred in build().
      Aborting...```
  </code></pre>