aruu

[MIRROR] Actual replacement for Busybox | suckless
git clone https://git.daat.foo/aruu.git
Log | Files | Refs | README | LICENSE

getopt_linux.c (270B)


      1 /* see LICENSE file for copyright and license details */
      2 #include "../util.h"
      3 
      4 #include <unistd.h>
      5 
      6 /* the Linux libcs, musl among them, start over when optind is 0 */
      7 #if defined(__linux__) && !defined(ARUU_FORCE_POSIX)
      8 void
      9 getopt_reset(void)
     10 {
     11   optind = 0;
     12 }
     13 #endif