Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
hmgle committed Jul 31, 2018
1 parent 222679f commit 9cafd9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,19 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

debug = 0

PREFIX = /usr/local
BINDIR = $(PREFIX)/bin

INSTALL = install -c

CFLAGS += -Wall
ifeq ($(debug), 1)
CFLAGS += -O0 -g
else
CFLAGS += -O2 -DNDEBUG
endif

SRC := $(wildcard *.c)

Expand Down
5 changes: 1 addition & 4 deletions graftcp-local/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ func (app *App) run() {
l := NewLocal(app.ListenAddr, app.Socks5Addr)

syscall.Mkfifo(app.PipePath, uint32(os.ModePerm))
err = os.Chmod(app.PipePath, 0666)
if err != nil {
dlog.Fatalf("os.Chmod(%s, 0666) err: %s", app.PipePath, err.Error())
}
os.Chmod(app.PipePath, 0666)
l.FifoFd, err = os.OpenFile(app.PipePath, os.O_RDWR, 0)
if err != nil {
dlog.Fatalf("os.OpenFile(%s) err: %s", app.PipePath, err.Error())
Expand Down

0 comments on commit 9cafd9e

Please sign in to comment.