mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
host: Use pledge()
This commit is contained in:
parent
d30d3fac6f
commit
8c2009c5be
Notes:
sideshowbarker
2024-07-19 10:10:50 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/8c2009c5bef
1 changed files with 6 additions and 0 deletions
|
@ -3,9 +3,15 @@
|
|||
#include <netinet/in.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
if (pledge("stdio dns", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (argc < 2) {
|
||||
printf("usage: host <hostname>\n");
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue