- gettimeofday(&w, 0);
- w.tv_sec += offset;
- ev_timeout(ev, 0, &w, volumecheck_again, 0);
+static void periodic_add_random(ev_source *ev_) {
+ add_random_track(ev_);
+}
+
+/* We fix the path to include the bindir and sbindir we were installed into */
+static void fix_path(void) {
+ char *path = getenv("PATH");
+ static char *newpath;
+ /* static or libgc collects it! */
+
+ if(!path)
+ error(0, "PATH is not set at all!");
+
+ if(*finkbindir && strcmp(finkbindir, "/"))
+ /* We appear to be a finkized mac; include fink on the path in case the
+ * tools we need are there. */
+ byte_xasprintf(&newpath, "PATH=%s:%s:%s:%s",
+ path, bindir, sbindir, finkbindir);
+ else
+ byte_xasprintf(&newpath, "PATH=%s:%s:%s", path, bindir, sbindir);
+ putenv(newpath);
+ info("%s", newpath);