X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=support%2Fsdk%2Fcpp%2Fsf%2Fsf.cpp;h=c5adcb13ea4638fee8f54572d8a671a7aff6ff6b;hb=f2aa9fb41a3e147a3715c028eb091806083de5ac;hp=fdf5ced473a7b001eb16346a6440cd2b3c39d2c1;hpb=0c7d0be1e6ce10f2b96cf07acca0a8d2c703ac19;p=tinyos-2.x.git diff --git a/support/sdk/cpp/sf/sf.cpp b/support/sdk/cpp/sf/sf.cpp index fdf5ced4..c5adcb13 100644 --- a/support/sdk/cpp/sf/sf.cpp +++ b/support/sdk/cpp/sf/sf.cpp @@ -46,6 +46,10 @@ #include "serialcomm.h" #include "packetbuffer.h" +#ifdef __APPLE__ +#include +#include +#endif using namespace std; @@ -54,6 +58,11 @@ using namespace std; int main(int argc, char *argv[]) { +#ifdef __APPLE__ + if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) + cerr << "Warning: failed to ignore SIGPIPE " << endl; +#endif + SFControl control; control.parseArgs(argc, argv); control.waitOnInput();