folkertvanheusden / HTTPing

Ping an HTTP server
GNU Affero General Public License v3.0
31 stars 9 forks source link

Unknown type: useconds_t building on macOS #4

Closed iandol closed 2 years ago

iandol commented 2 years ago

caveat emptor: I am not a c programmer...

Hi, when trying to update the formula for homebrew to build on macOS, I hit this error:

In file included from nc.c:22:
./utils.h:19:15: error: unknown type name 'useconds_t'
void myusleep(useconds_t v);

I see #include <unistd.h> is present in utils.c and I'm sure this is in the compiler path somehow (the developer tools on macOS includes the standard SDK and libc AFAIK). Reading this man page:

https://man7.org/linux/man-pages/man3/usleep.3.html

It suggested to replace useconds_t with unsigned int, and doing that in utils.h and httping compiles without any further issues. For homebrew I can automaticallt replace this before making, but just wanted to flag this.

folkertvanheusden commented 2 years ago

Thank you. If you can automatically replace it that would be great.

On Wed, Oct 26, 2022 at 6:00 AM Ian Max Andolina @.***> wrote:

caveat emptor: I am not a c programmer...

Hi, when trying to update the formula for homebrew to build on macOS, I hit this error:

In file included from nc.c:22: ./utils.h:19:15: error: unknown type name 'useconds_t' void myusleep(useconds_t v);

I see #include is present in utils.c and I'm sure this is in the compiler path somehow (the developer tools on macOS includes the standard SDK and libc AFAIK). Reading this man page:

https://man7.org/linux/man-pages/man3/usleep.3.html

It suggested to replace useconds_t with unsigned int, and doing that in utils.h and httping compiles without any further issues. For homebrew I can automaticallt replace this before making, but just wanted to flag this.

— Reply to this email directly, view it on GitHub https://github.com/folkertvanheusden/HTTPing/issues/4, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUN5IW5W7F2M5N4T6Y5QWBTWFCUEVANCNFSM6AAAAAAROSHPE4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>