gitweb/indextext_readonly.html: include sample readonly file
[girocco.git] / src / get_sun_path_len.c
blob15d4450ec2cfe40a534e5cf0d1dab0a57fbf10f4
1 /*
3 get_sun_path_len.c -- return maximum size of sockaddr_un.sun_path
4 Copyright (C) 2020 Kyle J. McKay.
5 All rights reserved.
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #include <stdio.h>
24 #include <sys/types.h>
25 #include <sys/socket.h>
26 #include <sys/un.h>
28 int main(int argc, char *argv[])
30 struct sockaddr_un sun;
31 (void)argc; (void)argv;
32 printf("%u\n", (unsigned)sizeof(sun.sun_path));
33 return 0;