[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Netsurf build failure: 'PATH_MAX' undeclared



Apologies for the consecutive emails.

On Mon, Apr 26, 2021 at 12:40:25PM +0200, João Pedro Malhado wrote:
> I made some simple changes to the time.c file and the build went on, only to
> fail at some later stage. The error that I'm getting is:
> 
> frontends/gtk/fetch.c: In function 'nsgtk_get_resource_url':
> frontends/gtk/fetch.c:252:11: error: 'PATH_MAX' undeclared (first use in this
> function)
> 	252 | char buf[PATH_MAX];
> 
> Now, the only C I know is what I can guess from other programming languages I'm
> familiar with, but this seems simple and not very hurd specific. However the
> build does not seem to have any problems on other platforms, so I don't know.
> Anyone has an idea on how to best approach this?

It does seem this is a documented issue:

https://www.gnu.org/software/hurd/hurd/porting/guidelines.html#Bad_File_Descriptor

What would be a reasonable approach here, change to use _POSIX_PATH_MAX?
I would need some guidance on implementing something more sophisticated as I
fear I would make a mess.

Regards,
João


Reply to: