A defensive wall is exactly what you need to help deter cannibals in Sons of the Forest. It might not keep them out indefinitely, but it's going to mean a lot more work for them to get their next meal than they may be prepared to put in. And if the temptation is too much for them, it gives you valuable time to execute your Plan B and start running.
Of course, stocking up on weapons and guns (opens in new tab) is another option for surviving a bit longer. But if the cannibals don't get you, the cold might—unless you had the foresight to collect the winter jacket (opens in new tab) before the snows set in. For the more immediate concern of becoming a snack for a local cannibal, here's how to build a defensive wall in Sons of the Forest.
Sons of the Forest defensive wall: How to build it
The defensive wall is built with logs, so you'll need to start chopping down trees—or get Kelvin (opens in new tab) to do it—before you get started. The number of logs you'll need will depend on the size of the area you want to fence off. Simple.
Once you're ready to start construction, pick up a log and right-click to change the orientation so you can insert it vertically into the ground. To get the pointy top, you'll need to take out your axe and look at the top part of the log until you can see the red lines which indicate where you'll chop. Left-click to finish the job and get your stabby deterrent working.
Once you've got one log placed, you'll need to repeat this multiple times until whatever you want to be protected is more or less surrounded. If you make a mistake with the placement of one of the vertical logs, pressing C will remove it. It's also worth noting that there's currently no way of making a defensive gate, so you'll need to leave a gap if you want to get in or out. Not ideal, but at least you'll make a kind of choke point if your base does come under attack.