facebook / proxygen

A collection of C++ HTTP libraries including an easy to use HTTP server.
Other
8.03k stars 1.47k forks source link

Building Proxygen in Windows #471

Closed SteveSelva closed 6 months ago

SteveSelva commented 6 months ago

Is it possible to build the latest version of Proxygen in Windows?

I am encountering an error while building Proxygen.

Severity Code Description Project File Line Suppression State Error C2760 syntax error: 'ss' was unexpected here; expected ';' proxygen E:\proxygen\proxygen\lib\services\RequestWorkerThread.cpp 56
Error C2059 syntax error: ')' proxygen E:\proxygen\proxygen\lib\services\RequestWorkerThread.cpp 74

RequestWorkerThread.cpp

void RequestWorkerThread::setup() {
  CHECK(evb_);
  evb_->runImmediatelyOrRunInEventBaseThreadAndWait([&]() {
    sigset_t ss;             //Error at this line (identifier "sigset_t" is undefined) 

    // Ignore some signals
    sigemptyset(&ss);
    sigaddset(&ss, SIGHUP);
    sigaddset(&ss, SIGINT);
    sigaddset(&ss, SIGQUIT);
    sigaddset(&ss, SIGUSR1);
    sigaddset(&ss, SIGUSR2);
    sigaddset(&ss, SIGPIPE);
    sigaddset(&ss, SIGALRM);
    sigaddset(&ss, SIGTERM);
    sigaddset(&ss, SIGCHLD);
    sigaddset(&ss, SIGIO);
    PCHECK(pthread_sigmask(SIG_BLOCK, &ss, nullptr) == 0);

    currentRequestWorker_ = this;
    callback_.workerStarted(this);
  });
}

Is there any way to fix this and build Proxygen in Windows?