[Lldb-commits] [PATCH] D151570: Fix Build error on Mac M1 : error: use of undeclared identifier 'getopt_long_only'; did you mean 'getopt_long'?

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri May 26 14:35:19 PDT 2023


JDevlieghere added a comment.

What host compiler are you using when you see this error? `getopt_long_only` is available on macOS. Does this compile for you?

  #include <getopt.h>
  
  int main(int argc, char** argv)
  {
    struct option longopts[] = {
      { "foo", required_argument, 0, 'f' },
    };
    int i;
    return getopt_long_only(argc, argv, "l::m:r:d",
        longopts, &i);
  }


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151570/new/

https://reviews.llvm.org/D151570



More information about the lldb-commits mailing list