summaryrefslogtreecommitdiff
path: root/sysdep/unix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep/unix')
-rw-r--r--sysdep/unix/io.c5
-rw-r--r--sysdep/unix/main.c24
2 files changed, 4 insertions, 25 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index 475d660c..f91b5278 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -588,9 +588,12 @@ static struct resclass sk_class = {
* This function creates a new socket resource. If you want to use it,
* you need to fill in all the required fields of the structure and
* call sk_open() to do the actual opening of the socket.
+ *
+ * The real function name is sock_new(), sk_new() is a macro wrapper
+ * to avoid collision with OpenSSL.
*/
sock *
-sk_new(pool *p)
+sock_new(pool *p)
{
sock *s = ralloc(p, &sk_class);
s->pool = p;
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c
index e0563aae..f0344a8f 100644
--- a/sysdep/unix/main.c
+++ b/sysdep/unix/main.c
@@ -162,29 +162,6 @@ cf_read(byte *dest, unsigned int len, int fd)
return l;
}
-static int
-cf_open(char *filename)
-{
- char full_name[BIRD_FNAME_MAX];
- char *cur = filename;
- int ret;
-
- if (*filename != '/') {
- char dir[BIRD_FNAME_MAX];
- strncpy(dir, config_name, sizeof(dir));
- dir[sizeof(dir)-1] = 0;
- snprintf(full_name, sizeof(full_name), "%s/%s", dirname(dir), filename);
- full_name[sizeof(full_name)-1] = 0;
- cur = full_name;
- }
-
- if ((ret = open(cur, O_RDONLY)) == -1)
- cf_error("Unable to open included configuration file: %s", cur);
-
- return ret;
-}
-
-
void
sysdep_preconfig(struct config *c)
{
@@ -216,7 +193,6 @@ unix_read_config(struct config **cp, char *name)
if (conf->file_fd < 0)
return 0;
cf_read_hook = cf_read;
- cf_open_hook = cf_open;
ret = config_parse(conf);
close(conf->file_fd);
return ret;