pkgsrc-Users archive

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

Re: Proper patching source code with HOST_NAME_MAX usage



Hi,

On 13.01.20 16:53, PHO wrote:
int main() {
         char hostname[sysconf(_SC_HOST_NAME_MAX)];
         printf("%d\n", sizeof(hostname));
         return 0;
}

Thank you for the quick help and the hint. I was not aware that this construct is possible and it is nice to see that it can be solved so cleanly.

Kind regards
Matthias


Home | Main Index | Thread Index | Old Index