aboutsummaryrefslogtreecommitdiffstats
path: root/ar
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2016-09-11 11:04:19 +0200
committerfilip <filip.komar@gmail.com>2016-09-11 11:04:19 +0200
commit64795b9c92335e5dffa1b13713c4dbe10be97177 (patch)
tree82be0b3642b4e973f5fa32120b8005f16272370c /ar
parent23f94e83c7fc5b0b14ff759db2339acf3148fd19 (diff)
downloadwww-64795b9c92335e5dffa1b13713c4dbe10be97177.tar
www-64795b9c92335e5dffa1b13713c4dbe10be97177.tar.gz
www-64795b9c92335e5dffa1b13713c4dbe10be97177.tar.bz2
www-64795b9c92335e5dffa1b13713c4dbe10be97177.tar.xz
www-64795b9c92335e5dffa1b13713c4dbe10be97177.zip
fixing error in mirrorlist URL path for source repositories (patch by Neal Gompa)
Diffstat (limited to 'ar')
0 files changed, 0 insertions, 0 deletions
>/grantpt.c
blob: 0aa903b29b92f99cd6ca587707e2d604cb5892ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#define _XOPEN_SOURCE
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <stdlib.h>

int grantpt (int fd) {
  struct stat st;
  if ((fstat(fd, &st))<0) return -1;
  if ((chmod((char*)ptsname(fd), st.st_mode | S_IRUSR | S_IWUSR | S_IWGRP))<0)
    return -1;
  return 0;
}